Skip to content

Commit e31ac53

Browse files
committed
cellnav on.navigate called on scroll
#4835
1 parent a6086ea commit e31ac53

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/features/cellnav/js/cellnav.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -681,8 +681,10 @@
681681
if (grid.cellNav.lastRowCol === null || rowColSelectIndex === -1) {
682682
var newRowCol = new GridRowColumn(row, col);
683683

684-
grid.api.cellNav.raise.navigate(newRowCol, grid.cellNav.lastRowCol);
685-
grid.cellNav.lastRowCol = newRowCol;
684+
if (grid.cellNav.lastRowCol === null || grid.cellNav.lastRowCol.row !== newRowCol.row || grid.cellNav.lastRowCol.col !== newRowCol.col){
685+
grid.api.cellNav.raise.navigate(newRowCol, grid.cellNav.lastRowCol);
686+
grid.cellNav.lastRowCol = newRowCol;
687+
}
686688
if (uiGridCtrl.grid.options.modifierKeysToMultiSelectCells && modifierDown) {
687689
grid.cellNav.focusedCells.push(rowCol);
688690
} else {

0 commit comments

Comments
 (0)