From: Alexander Ebert Date: Fri, 9 Sep 2016 09:01:10 +0000 (+0200) Subject: Fix for selection missing on init X-Git-Tag: 3.0.0_Beta_1~251 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=26260a65c3a0a826494d437531a67d783b116995;p=GitHub%2FWoltLab%2FWCF.git Fix for selection missing on init --- diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Redactor/Quote.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Redactor/Quote.js index 7630cc74b8..f073377e69 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Redactor/Quote.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Redactor/Quote.js @@ -60,7 +60,10 @@ define(['Core', 'EventHandler', 'EventKey', 'Language', 'StringUtil', 'Dom/Util' // caret must be within a `

`, if it is not: move it var block = this._editor.selection.block(); - + if (block === false) { + this._editor.focus.end(); + block = this._editor.selection.block(); + } while (block && block.parentNode !== editor) { block = block.parentNode;