From 0bc0e07e844049fb3e80949f6bb2600be61abdd6 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Mon, 6 Jul 2015 15:02:19 +0200 Subject: [PATCH] Fixed handling of full quotes if editor is not active --- wcfsetup/install/files/js/WCF.Message.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) 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); -- 2.20.1