From 2f3e89d82c4f6693c7e770d6b08303d31a9d1a6e Mon Sep 17 00:00:00 2001 From: Vlyan Date: Thu, 7 Jan 2021 12:55:07 +0100 Subject: [PATCH] 20Q : Scroll on top on next button --- system/scripts/actors/twenty-questions-dialog.js | 1 + 1 file changed, 1 insertion(+) diff --git a/system/scripts/actors/twenty-questions-dialog.js b/system/scripts/actors/twenty-questions-dialog.js index 86c43a5..d938d52 100644 --- a/system/scripts/actors/twenty-questions-dialog.js +++ b/system/scripts/actors/twenty-questions-dialog.js @@ -171,6 +171,7 @@ export class TwentyQuestionsDialog extends FormApplication { const tab = this._tabs.find((e) => e._navSelector === ".sheet-tabs"); const next = parseInt(tab.active.replace(/[^0-9]/g, "")) + 1; tab.activate("part" + next); + $(event.currentTarget).closest(".window-content").scrollTop(0); }); // *** Everything below here is only needed if the sheet is editable ***