From: Matthias Schmidt Date: Thu, 20 Jun 2019 08:42:04 +0000 (+0200) Subject: Fix cancel button of form builder dialogs X-Git-Tag: 5.2.0_Alpha_1~36 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d9dcf8fce6931eb0fdc68d93ec193a572e4d011e;p=GitHub%2FWoltLab%2FWCF.git Fix cancel button of form builder dialogs See #2509 --- 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)); }