From 1f4d424bd67ab1f38eb25849165d9422bba06613 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sun, 14 Dec 2014 16:51:07 +0100 Subject: [PATCH] Fixed inserting quotes fail if editor is not visible yet --- wcfsetup/install/files/js/WCF.Message.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) 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); - } - } }, /** -- 2.20.1