From a3de59de749521330cd60bfc2d991e0eb4e1b18b Mon Sep 17 00:00:00 2001 From: jrwerkman Date: Tue, 28 Oct 2025 14:14:52 +0100 Subject: [PATCH] Fix for jumping glitch while scrolling with the VirtualVScroller --- modules/VirtualVScroller.js | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/modules/VirtualVScroller.js b/modules/VirtualVScroller.js index fc063bb6f..541f5559c 100644 --- a/modules/VirtualVScroller.js +++ b/modules/VirtualVScroller.js @@ -280,14 +280,8 @@ define([ if(typeof start == 'number' && typeof end == 'number'){ //Only need to render when the range is valid body.renderRows(start, end - start, pos); - if(a && start < end){ - //Scroll the body to hide the newly added top rows. - var n = query('[visualindex="' + end + '"]', bn)[0]; - if(n){ - deltaT += n.offsetTop; - } - } - } + } + //Ensure the position when user scrolls to end points if(nearTop){ bn.scrollTop = 0; @@ -298,7 +292,11 @@ define([ bn.scrollTop += deltaT; } } - t._doVirtual(); + + // Same (reversed criteria), when new rows + // are rendered, skip _doVirtual. + if(typeof start != 'number' || typeof end != 'number') + t._doVirtual(); }, _doScroll: function(e, forced, noLazy){