From: Alexander Ebert Date: Mon, 6 Jul 2015 13:02:19 +0000 (+0200) Subject: Fixed handling of full quotes if editor is not active X-Git-Tag: 2.1.6~16^2~2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0bc0e07e844049fb3e80949f6bb2600be61abdd6;p=GitHub%2FWoltLab%2FWCF.git Fixed handling of full quotes if editor is not active --- diff --git a/wcfsetup/install/files/js/WCF.Message.js b/wcfsetup/install/files/js/WCF.Message.js index ff59f92601..1da687b688 100644 --- a/wcfsetup/install/files/js/WCF.Message.js +++ b/wcfsetup/install/files/js/WCF.Message.js @@ -2847,21 +2847,26 @@ WCF.Message.Quote.Manager = Class.extend({ $quote = data.quote.text; $username = data.quote.username; $link = data.quote.link; - console.debug("right here"); } // insert into editor if ($.browser.redactor) { if (this._editorElementAlternative === null) { + var insert = true; if (event !== null || data !== null) { var $api = $('.jsQuickReply:eq(0)').data('__api'); if ($api && !$api.getContainer().is(':visible')) { - this._insertQuotes = false; - $api.click(null); + if (data.forceInsert) { + this._insertQuotes = false; + $api.click(null); + } + else { + insert = false; + } } } - this._editorElement.redactor('wbbcode.insertQuoteBBCode', $username, $link, $quote, $quote); + if (insert) this._editorElement.redactor('wbbcode.insertQuoteBBCode', $username, $link, $quote, $quote); } else { this._editorElementAlternative.redactor('wbbcode.insertQuoteBBCode', $username, $link, $quote, $quote);