From d29899c0391f40e545ee02cbdb7d0b51513f5d7e Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Fri, 31 Oct 2014 18:26:52 +0100 Subject: [PATCH] Fixed wutil.selectionEndOfEditor() --- wcfsetup/install/files/js/3rdParty/redactor/plugins/wutil.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wutil.js b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wutil.js index 4c513f73b3..09e717db50 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wutil.js +++ b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wutil.js @@ -354,10 +354,10 @@ RedactorPlugins.wutil = function() { // sometimes the last

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); -- 2.20.1