From: Alexander Ebert Date: Mon, 23 Jul 2018 11:29:58 +0000 (+0200) Subject: `Element.scrollTo()` is not standardized X-Git-Tag: 3.0.17~23 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=afbfd49ec0029affaac001ca5fb0d539266c9c72;p=GitHub%2FWoltLab%2FWCF.git `Element.scrollTo()` is not standardized --- 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);