From d88d985575049ab099dade94c8749b6f0c4e2fb8 Mon Sep 17 00:00:00 2001 From: Vlyan Date: Tue, 2 Feb 2021 15:32:03 +0100 Subject: [PATCH] 20q Disable the generate button once clicked --- 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 26fac48..a82020a 100644 --- a/system/scripts/actors/twenty-questions-dialog.js +++ b/system/scripts/actors/twenty-questions-dialog.js @@ -208,6 +208,7 @@ export class TwentyQuestionsDialog extends FormApplication { html.find("#generate").on("click", async (event) => { event.preventDefault(); event.stopPropagation(); + $(event.currentTarget).prop("disabled", true); await this.object.toActor(this.actor, flattenObject(this.cache)); await this.close({ submit: true, force: true }); });