From: Alexander Ebert Date: Sat, 17 Dec 2016 12:42:40 +0000 (+0100) Subject: Fixed selection handling during text format X-Git-Tag: 3.0.0_RC_2~41 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=941759338e9fe9b98086096325d0a8b2d721a55d;p=GitHub%2FWoltLab%2FWCF.git Fixed selection handling during text format --- 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); }