From d4fb228f99dc4ee40b59c11b1f9158d429ced88a Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Wed, 28 Sep 2016 17:04:43 +0200 Subject: [PATCH] Rely on native `click()` method if possible --- .../files/js/3rdParty/redactor2/plugins/WoltLabKeydown.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabKeydown.js b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabKeydown.js index e0a6f94172..6bd46e75b9 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabKeydown.js +++ b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabKeydown.js @@ -231,7 +231,12 @@ $.Redactor.prototype.WoltLabKeydown = function() { if (submit) { data.cancel = true; - Core.triggerEvent(submitButton, WCF_CLICK_EVENT); + if (typeof submitButton.click === 'function') { + submitButton.click(); + } + else { + Core.triggerEvent(submitButton, WCF_CLICK_EVENT); + } } } }).bind(this)); -- 2.20.1