From: Alexander Ebert Date: Mon, 2 Feb 2015 17:29:28 +0000 (+0100) Subject: Fixed the famous br[type=_moz] bug. Again. X-Git-Tag: 2.1.0_Beta_4~5 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=150e6c3c27dbf40fe261af3eb9af2a5bff8d6fb4;p=GitHub%2FWoltLab%2FWCF.git Fixed the famous br[type=_moz] bug. Again. --- diff --git a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js index 0f309e8cb8..3fefe1a1d0 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js +++ b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js @@ -1735,7 +1735,12 @@ RedactorPlugins.wbbcode = function() { if ($quote !== null) { // set caret inside the quote if (!$html.length) { - this.caret.setStart($quote.find('> div')[0]); + // careful, Firefox is stupid and replaces an empty div with br[type=_moz] + if ($.browser.mozilla) { + $quote.children('br[type=_moz]').replaceWith('
' + this.opts.invisibleSpace + '
'); + } + + this.caret.setStart($quote.children('div')[0]); } }