Fixed wutil.selectionEndOfEditor()
authorAlexander Ebert <ebert@woltlab.com>
Fri, 31 Oct 2014 17:26:52 +0000 (18:26 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 31 Oct 2014 17:26:52 +0000 (18:26 +0100)
wcfsetup/install/files/js/3rdParty/redactor/plugins/wutil.js

index 4c513f73b31270b7a1f79309ac971f21f85f9f02..09e717db50972e5502047a94a245d262fdd1087d 100644 (file)
@@ -354,10 +354,10 @@ RedactorPlugins.wutil = function() {
                                // sometimes the last <p> is just empty, causing the method to fail
                                if ($lastChild.innerHTML === '') {
                                        $lastChild.remove();
-                                       $lastChild = $(this.opts.emptyHtml).appendTo(this.$editor);
+                                       $lastChild = $(this.opts.emptyHtml).appendTo(this.$editor)[0];
                                }
                                
-                               this.caret.setEnd($lastChild[0]);
+                               this.caret.setEnd($lastChild);
                        }
                        else {
                                this.wutil.setCaretAfter($lastChild);