From 07a73681afd4fa05c6c4e12d6f2503d0d31e29f0 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 29 Jan 2019 21:34:53 +0100 Subject: [PATCH] Prevent the rule generator from being triggered on form submit via keyboard See #2817 --- .../js/WoltLabSuite/Core/Acp/Ui/Option/RewriteGenerator.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); -- 2.20.1