From 647872267c56c511db7c559bcedf83feb3254192 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sun, 8 Apr 2018 16:57:30 +0200 Subject: [PATCH] Incorrect internal position for empty paragraphs --- .../files/js/3rdParty/redactor2/plugins/WoltLabCaret.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabCaret.js b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabCaret.js index a462462717..5bb05e5797 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabCaret.js +++ b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabCaret.js @@ -33,6 +33,10 @@ $.Redactor.prototype.WoltLabCaret = function() { useCustomRange = true; } } + else if (node.nodeName === 'P' && node.childNodes.length === 0) { + node.innerHTML = '\u200B'; + useCustomRange = true; + } if (useCustomRange) { var selection = window.getSelection(); -- 2.20.1