diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/slick.cellselectionmodel.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/slick.cellselectionmodel.js b/plugins/slick.cellselectionmodel.js index d01bc34..74bc3eb 100644 --- a/plugins/slick.cellselectionmodel.js +++ b/plugins/slick.cellselectionmodel.js @@ -126,8 +126,10 @@ var new_last = new Slick.Range(active.row, active.cell, active.row + dirRow*dRow, active.cell + dirCell*dCell); if (removeInvalidRanges([new_last]).length) { ranges.push(new_last); - _grid.scrollRowIntoView(dirRow > 0 ? new_last.toRow : new_last.fromRow); - _grid.scrollCellIntoView(new_last.fromRow, dirCell > 0 ? new_last.toCell : new_last.fromCell); + var viewRow = dirRow > 0 ? new_last.toRow : new_last.fromRow; + var viewCell = dirCell > 0 ? new_last.toCell : new_last.fromCell; + _grid.scrollRowIntoView(viewRow); + _grid.scrollCellIntoView(viewRow, viewCell); } else ranges.push(last); |