From f1635618caf9abf4d1b829c72258313e23a56ffa Mon Sep 17 00:00:00 2001 From: Alexey Koshelev Date: Mon, 24 Nov 2025 10:42:38 +0300 Subject: [PATCH] [common] Fix bug 49094 --- apps/common/main/lib/controller/Comments.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/common/main/lib/controller/Comments.js b/apps/common/main/lib/controller/Comments.js index cbcd82dc50..162326e5fe 100644 --- a/apps/common/main/lib/controller/Comments.js +++ b/apps/common/main/lib/controller/Comments.js @@ -712,7 +712,7 @@ define([ if (model) { this.collection.remove(model); if (!silentUpdate) { - this.updateComments(true); + this.updateComments(true, undefined, undefined, true); } } @@ -1089,16 +1089,18 @@ define([ // internal - updateComments: function (needRender, disableSort, loadText) { + updateComments: function (needRender, disableSort, loadText, isSaveScrollPos) { var me = this; me.updateCommentsTime = new Date(); me.disableSort = !!disableSort; if (me.timerUpdateComments===undefined) me.timerUpdateComments = setInterval(function(){ if ((new Date()) - me.updateCommentsTime>100) { + const scrollPos = me.view.commentsView.scroller.getScrollTop(); clearInterval(me.timerUpdateComments); me.timerUpdateComments = undefined; me.updateCommentsView(needRender, me.disableSort, loadText); + isSaveScrollPos && me.view.commentsView.scroller.scrollTop(scrollPos); } }, 25); },