From: Alexander Ebert Date: Mon, 22 Feb 2021 22:23:29 +0000 (+0100) Subject: Requesting the preview caused Firefox to submit the form X-Git-Tag: 5.3.5~16 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f2a0a3677d75721b3e1a87b4d93f57eb5ab44d41;p=GitHub%2FWoltLab%2FWCF.git Requesting the preview caused Firefox to submit the form --- diff --git a/wcfsetup/install/files/js/WCF.Message.js b/wcfsetup/install/files/js/WCF.Message.js index aa137f10d5..f8cf41363b 100644 --- a/wcfsetup/install/files/js/WCF.Message.js +++ b/wcfsetup/install/files/js/WCF.Message.js @@ -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 + "'");