Prevent the rule generator from being triggered on form submit via keyboard
authorAlexander Ebert <ebert@woltlab.com>
Tue, 29 Jan 2019 20:34:53 +0000 (21:34 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 29 Jan 2019 20:34:53 +0000 (21:34 +0100)
See #2817

wcfsetup/install/files/js/WoltLabSuite/Core/Acp/Ui/Option/RewriteGenerator.js

index fa3a02cce57127910a606082d1ba150962580566..31517b469640a9312739a46929e6b95b0e57976a 100644 (file)
@@ -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);