From 55ff4bf999fd6990f2a70177a53f22ef10ad178d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Tue, 21 Jul 2020 12:03:19 +0200 Subject: [PATCH] Trigger change event when a file is being uploaded / deleted for uploadFormField --- wcfsetup/install/files/js/WoltLabSuite/Core/Ui/File/Delete.js | 1 + wcfsetup/install/files/js/WoltLabSuite/Core/Ui/File/Upload.js | 1 + 2 files changed, 2 insertions(+) diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/File/Delete.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/File/Delete.js index 46a1fb72a1..520966758e 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/File/Delete.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/File/Delete.js @@ -146,6 +146,7 @@ define(['Ajax', 'Core', 'Dom/ChangeListener', 'Language', 'Dom/Util', 'Dom/Trave } this._uploadHandler.checkMaxFiles(); + Core.triggerEvent(this._target, 'change'); }, _ajaxSetup: function () { diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/File/Upload.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/File/Upload.js index 375fa63e58..e8296638ff 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/File/Upload.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/File/Upload.js @@ -186,6 +186,7 @@ define(['Core', 'Language', 'Dom/Util', 'WoltLabSuite/Core/Ui/File/Delete', 'Upl // create delete buttons this._deleteHandler.rebuild(); this.checkMaxFiles(); + Core.triggerEvent(this._target, 'change'); }, _getFormData: function() { -- 2.20.1