Properly setting caret after codeBox upon insert
authorAlexander Ebert <ebert@woltlab.com>
Fri, 6 Feb 2015 14:37:00 +0000 (15:37 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 6 Feb 2015 14:37:00 +0000 (15:37 +0100)
wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js

index 3fefe1a1d05719227eae574e9ae728905585a53f..81eb1f6eb6e80d3104051623f102e829efd34039 100644 (file)
@@ -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));