From: Alexander Ebert Date: Tue, 29 Jan 2019 20:34:53 +0000 (+0100) Subject: Prevent the rule generator from being triggered on form submit via keyboard X-Git-Tag: 5.2.0_Alpha_1~334 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=07a73681afd4fa05c6c4e12d6f2503d0d31e29f0;p=GitHub%2FWoltLab%2FWCF.git Prevent the rule generator from being triggered on form submit via keyboard See #2817 --- diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Acp/Ui/Option/RewriteGenerator.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Acp/Ui/Option/RewriteGenerator.js index fa3a02cce5..31517b4696 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Acp/Ui/Option/RewriteGenerator.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Acp/Ui/Option/RewriteGenerator.js @@ -25,7 +25,9 @@ define(['Ajax', 'Language', 'Ui/Dialog'], function (Ajax, Language, UiDialog) { dt.classList.add('jsOnly'); var dd = elCreate('dd'); - _buttonGenerate = elCreate('button'); + _buttonGenerate = elCreate('a'); + _buttonGenerate.className = 'button'; + _buttonGenerate.href = '#'; _buttonGenerate.textContent = Language.get('wcf.acp.rewrite.generate'); _buttonGenerate.addEventListener(WCF_CLICK_EVENT, this._onClick.bind(this)); dd.appendChild(_buttonGenerate);