From 3e9e191bba488850ce00b3046b62d7960e942e61 Mon Sep 17 00:00:00 2001 From: "stravo1@mac" Date: Thu, 19 Feb 2026 21:57:22 +0530 Subject: [PATCH 1/2] fix: arrow key navigation stops working after scrolling a few rows --- src/cellmanager.js | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/cellmanager.js b/src/cellmanager.js index 8275bfd..755f3ef 100644 --- a/src/cellmanager.js +++ b/src/cellmanager.js @@ -33,6 +33,7 @@ export default class CellManager { this.bindKeyboardSelection(); this.bindCopyCellContents(); this.bindMouseEvents(); + this.bindWheelEvents(); this.bindTreeEvents(); } @@ -81,6 +82,7 @@ export default class CellManager { } this.focusCell($cell); + sessionStorage.setItem('dt-last-nav-method', 'scroll'); return true; }; @@ -189,6 +191,12 @@ export default class CellManager { $.on(this.bodyScrollable, 'mousemove', '.dt-cell', throttle(selectArea, 50)); } + bindWheelEvents() { + $.on(this.bodyScrollable, 'wheel', (e) => { + sessionStorage.setItem('dt-last-nav-method', 'scroll'); + }); + } + bindTreeEvents() { $.on(this.bodyScrollable, 'click', '.dt-tree-node__toggle', (e, $toggle) => { const $cell = $.closest('.dt-cell', $toggle); @@ -313,11 +321,13 @@ export default class CellManager { // this function is called after hyperlist renders the rows after scroll, // focusCell calls clearSelection which resets the area selection // so a flag to skip it - // we also skip DOM focus and scroll to cell - // because it fights with the user scroll + // we skip scroll to cell + // and also skip DOM focus (if user is scrolling) because it fights with the user scroll + const skipDOMFocus = sessionStorage.getItem('dt-last-nav-method') !== 'key'; + this.focusCell($cell, { + skipDOMFocus, skipClearSelection: 1, - skipDOMFocus: 1, skipScrollToCell: 1 }); } @@ -714,6 +724,7 @@ export default class CellManager { } this.focusCell($cell); + sessionStorage.setItem('dt-last-nav-method', 'key'); return true; } From 6a16214f9a9808f47f961b090b6ddbe2cc6648f4 Mon Sep 17 00:00:00 2001 From: "stravo1@mac" Date: Fri, 20 Feb 2026 07:35:42 +0530 Subject: [PATCH 2/2] fix: update navigation method to use keyboard instead of scroll --- src/cellmanager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cellmanager.js b/src/cellmanager.js index 755f3ef..0f20473 100644 --- a/src/cellmanager.js +++ b/src/cellmanager.js @@ -82,7 +82,7 @@ export default class CellManager { } this.focusCell($cell); - sessionStorage.setItem('dt-last-nav-method', 'scroll'); + sessionStorage.setItem('dt-last-nav-method', 'key'); return true; };