From 1be95f01b130bfac08d3083b7977b9afcc15b909 Mon Sep 17 00:00:00 2001 From: John Livingston Date: Thu, 20 Jun 2024 14:39:15 +0200 Subject: [PATCH] Fix: clicking on the import custom emojis button, without selected any file, was resulting in a state with all action button disabled. --- CHANGELOG.md | 4 ++++ client/common/configuration/elements/channel-emojis.ts | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 208cc01c..7a460cff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 10.1.2 + +* Fix: clicking on the import custom emojis button, without selected any file, was resulting in a state with all action button disabled. + ## 10.1.1 * Fix #436: Saving emojis per batch, to avoid hitting max payload limit. diff --git a/client/common/configuration/elements/channel-emojis.ts b/client/common/configuration/elements/channel-emojis.ts index 4e754e00..4475cc65 100644 --- a/client/common/configuration/elements/channel-emojis.ts +++ b/client/common/configuration/elements/channel-emojis.ts @@ -132,7 +132,6 @@ export class ChannelEmojisElement extends LivechatElement { */ public async importEmojis (ev: Event): Promise { ev.preventDefault() - this.actionDisabled = true try { // download a json file: const file = await new Promise((resolve, reject) => { @@ -153,6 +152,8 @@ export class ChannelEmojisElement extends LivechatElement { input.remove() }) + this.actionDisabled = true + const content = await new Promise((resolve, reject) => { const fileReader = new FileReader() fileReader.onerror = reject