20q Disable the generate button once clicked

This commit is contained in:
Vlyan
2021-02-02 15:32:03 +01:00
parent 9f8a24bd68
commit d88d985575

View File

@@ -208,6 +208,7 @@ export class TwentyQuestionsDialog extends FormApplication {
html.find("#generate").on("click", async (event) => { html.find("#generate").on("click", async (event) => {
event.preventDefault(); event.preventDefault();
event.stopPropagation(); event.stopPropagation();
$(event.currentTarget).prop("disabled", true);
await this.object.toActor(this.actor, flattenObject(this.cache)); await this.object.toActor(this.actor, flattenObject(this.cache));
await this.close({ submit: true, force: true }); await this.close({ submit: true, force: true });
}); });