diff options
author | Ibrahim Karahan <ibrahimkarahan@gmail.com> | 2013-06-27 12:35:33 -0400 |
---|---|---|
committer | Ibrahim Karahan <ibrahimkarahan@gmail.com> | 2013-06-27 12:35:33 -0400 |
commit | 3ccdfcf09bcd12d49dd10ddb0f34a252ae361e9c (patch) | |
tree | 0ea39384ec2defa7bcbb3def70d7f5aec0597d54 | |
parent | 59c371f5349c4fb6de3df320552a513f8a8bf9a1 (diff) | |
download | SlickGrid-3ccdfcf09bcd12d49dd10ddb0f34a252ae361e9c.zip SlickGrid-3ccdfcf09bcd12d49dd10ddb0f34a252ae361e9c.tar.gz SlickGrid-3ccdfcf09bcd12d49dd10ddb0f34a252ae361e9c.tar.bz2 |
Fixed scrolling with keyboard selection
-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); |