From: Alexander Ebert Date: Sun, 14 Dec 2014 15:51:07 +0000 (+0100) Subject: Fixed inserting quotes fail if editor is not visible yet X-Git-Tag: 2.1.0_Beta_1~3^2~2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1f4d424bd67ab1f38eb25849165d9422bba06613;p=GitHub%2FWoltLab%2FWCF.git Fixed inserting quotes fail if editor is not visible yet --- diff --git a/wcfsetup/install/files/js/WCF.Message.js b/wcfsetup/install/files/js/WCF.Message.js index 609db9776a..0500ebbdbd 100644 --- a/wcfsetup/install/files/js/WCF.Message.js +++ b/wcfsetup/install/files/js/WCF.Message.js @@ -2778,6 +2778,14 @@ WCF.Message.Quote.Manager = Class.extend({ // insert into editor if ($.browser.redactor) { if (this._editorElementAlternative === null) { + if (event !== null) { + var $api = $('.jsQuickReply:eq(0)').data('__api'); + if ($api && !$api.getContainer().is(':visible')) { + this._insertQuotes = false; + $api.click(null); + } + } + this._editorElement.redactor('wbbcode.insertQuoteBBCode', $message.attr('data-username'), $message.data('link'), $quote, $quote); } else { @@ -2808,14 +2816,6 @@ WCF.Message.Quote.Manager = Class.extend({ if (event !== null) { this._dialog.wcfDialog('close'); } - - if (event !== null && this._editorElementAlternative === null) { - var $api = $('.jsQuickReply:eq(0)').data('__api'); - if ($api && !$api.getContainer().is(':visible')) { - this._insertQuotes = false; - $api.click(null); - } - } }, /**