From 1c19ac22e1ac70584445d8f7e93b9f66c18b92a8 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Mon, 12 Dec 2016 17:33:04 +0100 Subject: [PATCH] Fixed text formatting in Microsoft Edge --- .../files/js/WoltLabSuite/Core/Ui/Redactor/Format.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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 c319ae30b6..b6df70a35e 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Redactor/Format.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Redactor/Format.js @@ -56,15 +56,18 @@ define(['Dom/Util'], function(DomUtil) { tmpRange.collapse(false); tmpRange.insertNode(markerEnd); - // 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); + + // remove existing format before applying new one + this.removeFormat(editorElement, property); + + selection.removeAllRanges(); + selection.addRange(range); } if (tmpElement === null) { -- 2.20.1