Requesting the preview caused Firefox to submit the form
authorAlexander Ebert <ebert@woltlab.com>
Mon, 22 Feb 2021 22:23:29 +0000 (23:23 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 22 Feb 2021 22:23:29 +0000 (23:23 +0100)
wcfsetup/install/files/js/WCF.Message.js

index aa137f10d5bc7c1d01b213e33dfdbb6b55038008..f8cf41363b91e9042e362f0b79debd671977e9ad 100644 (file)
@@ -328,6 +328,8 @@ if (COMPILER_TARGET_DEFAULT) {
                 * Reads message field input and triggers an AJAX request.
                 */
                _click: function (event) {
+                       event.preventDefault();
+                       
                        var $message = this._getMessage();
                        if ($message === null) {
                                console.debug("[WCF.Message.Preview] Unable to access Redactor instance of '" + this._messageFieldID + "'");