From 941759338e9fe9b98086096325d0a8b2d721a55d Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sat, 17 Dec 2016 13:42:40 +0100 Subject: [PATCH] Fixed selection handling during text format --- .../install/files/js/WoltLabSuite/Core/Ui/Redactor/Format.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Redactor/Format.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Redactor/Format.js index b6df70a35e..ea6eaddc5a 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Redactor/Format.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Redactor/Format.js @@ -66,6 +66,10 @@ define(['Dom/Util'], function(DomUtil) { // remove existing format before applying new one this.removeFormat(editorElement, property); + range = document.createRange(); + range.setStartAfter(markerStart); + range.setEndBefore(markerEnd); + selection.removeAllRanges(); selection.addRange(range); } -- 2.20.1