summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorIbrahim Karahan <ibrahimkarahan@gmail.com>2013-06-27 12:35:33 -0400
committerIbrahim Karahan <ibrahimkarahan@gmail.com>2013-06-27 12:35:33 -0400
commit3ccdfcf09bcd12d49dd10ddb0f34a252ae361e9c (patch)
tree0ea39384ec2defa7bcbb3def70d7f5aec0597d54 /plugins
parent59c371f5349c4fb6de3df320552a513f8a8bf9a1 (diff)
downloadSlickGrid-3ccdfcf09bcd12d49dd10ddb0f34a252ae361e9c.zip
SlickGrid-3ccdfcf09bcd12d49dd10ddb0f34a252ae361e9c.tar.gz
SlickGrid-3ccdfcf09bcd12d49dd10ddb0f34a252ae361e9c.tar.bz2
Fixed scrolling with keyboard selection
Diffstat (limited to 'plugins')
-rw-r--r--plugins/slick.cellselectionmodel.js6
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);