From d9dcf8fce6931eb0fdc68d93ec193a572e4d011e Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Thu, 20 Jun 2019 10:42:04 +0200 Subject: [PATCH] Fix cancel button of form builder dialogs See #2509 --- .../install/files/js/WoltLabSuite/Core/Form/Builder/Dialog.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Form/Builder/Dialog.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Form/Builder/Dialog.js index 20f3844ddc..6bf2009b8c 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Form/Builder/Dialog.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Form/Builder/Dialog.js @@ -136,7 +136,7 @@ define(['Ajax', 'Core', './Manager', 'Ui/Dialog'], function(Ajax, Core, FormBuil * @param {HTMLElement} content dialog's content element */ _dialogOnSetup: function(content) { - var cancelButton = elById(this._formId + '_cancelButton', content); + var cancelButton = elBySel('button[data-type=cancel]', content); if (cancelButton !== null) { cancelButton.addEventListener('click', this._closeDialog.bind(this)); } -- 2.20.1