From: Alexander Ebert Date: Fri, 6 Feb 2015 14:37:00 +0000 (+0100) Subject: Properly setting caret after codeBox upon insert X-Git-Tag: 2.1.0_RC_1~68 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d539db4437c076b0897453e988cfa775de6e6099;p=GitHub%2FWoltLab%2FWCF.git Properly setting caret after codeBox upon insert --- diff --git a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js index 3fefe1a1d0..81eb1f6eb6 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js +++ b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js @@ -1941,7 +1941,7 @@ RedactorPlugins.wbbcode = function() { // document.execCommand('insertHTML') seems to drop 'contenteditable="false"' for root element $codeBox.attr('contenteditable', 'false'); - this.caret.setAfter($codeBox); + this.wutil.setCaretAfter($codeBox[0]); this.modal.close(); }, this));