From: Alexander Ebert Date: Fri, 6 Oct 2017 10:19:47 +0000 (+0200) Subject: Caret was incorrectly placed when hitting the padding of a block element X-Git-Tag: 3.0.10~15 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=dd9ae8c0b9c34d6f36bbcfc9b47df1b879831eb4;p=GitHub%2FWoltLab%2FWCF.git Caret was incorrectly placed when hitting the padding of a block element --- diff --git a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabCaret.js b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabCaret.js index e7451f28f6..b77aebc6aa 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabCaret.js +++ b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabCaret.js @@ -288,6 +288,11 @@ $.Redactor.prototype.WoltLabCaret = function() { } } + // click occured inside the boundaries of the block + if (insertBefore === undefined) { + return; + } + // check if there is already a paragraph in place var sibling = block[(insertBefore ? 'previous' : 'next') + 'ElementSibling']; if (sibling && sibling.nodeName === 'P') {