From 26260a65c3a0a826494d437531a67d783b116995 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Fri, 9 Sep 2016 11:01:10 +0200 Subject: [PATCH] Fix for selection missing on init --- .../install/files/js/WoltLabSuite/Core/Ui/Redactor/Quote.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; -- 2.20.1