From 8af4a1d486d5dd31f1ecd73d2f214f923d5573e5 Mon Sep 17 00:00:00 2001 From: yflory Date: Wed, 9 Jun 2021 14:40:24 +0200 Subject: [PATCH] Preserve scroll position in codemirror #731 --- www/common/sframe-common-codemirror.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/www/common/sframe-common-codemirror.js b/www/common/sframe-common-codemirror.js index 970272124..58475bbed 100644 --- a/www/common/sframe-common-codemirror.js +++ b/www/common/sframe-common-codemirror.js @@ -73,6 +73,8 @@ define([ else { editor.setSelection(posToCursor(selects[0], remoteDoc), posToCursor(selects[1], remoteDoc)); } + + editor.scrollTo(scroll.left, scroll.top); }; module.handleImagePaste = function (editor) {