From afbfd49ec0029affaac001ca5fb0d539266c9c72 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Mon, 23 Jul 2018 13:29:58 +0200 Subject: [PATCH] `Element.scrollTo()` is not standardized --- .../files/js/3rdParty/redactor2/plugins/WoltLabCaret.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabCaret.js b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabCaret.js index fabd0261ba..f2f03f18c5 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabCaret.js +++ b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabCaret.js @@ -299,9 +299,11 @@ $.Redactor.prototype.WoltLabCaret = function() { } // the scroll position is discarded when focusing the editor - var scroll = { x: editor.scrollLeft, y: editor.scrollTop }; + var scrollLeft = editor.scrollLeft; + var scrollTop = editor.scrollTop; editor.focus(); - editor.scrollTo(scroll.x, scroll.y); + editor.scrollLeft = scrollLeft; + editor.scrollTop = scrollTop; selection.removeAllRanges(); selection.addRange(internalRange); -- 2.20.1