scrollToCell before .focus()

- .focus() scrolls to cell automatically, which conflicts with how scrollToCell works
- so changed the order
This commit is contained in:
Faris Ansari 2018-02-21 15:04:05 +05:30
parent 62203c79bb
commit 3c4198fc83
3 changed files with 6 additions and 3 deletions

View File

@ -1328,6 +1328,8 @@ class CellManager {
return;
}
this.scrollToCell($cell);
this.deactivateEditing();
if (!skipClearSelection) {
this.clearSelection();
@ -1344,7 +1346,6 @@ class CellManager {
$cell.focus();
this.highlightRowColumnHeader($cell);
this.scrollToCell($cell);
}
highlightRowColumnHeader($cell) {

View File

@ -1327,6 +1327,8 @@ class CellManager {
return;
}
this.scrollToCell($cell);
this.deactivateEditing();
if (!skipClearSelection) {
this.clearSelection();
@ -1343,7 +1345,6 @@ class CellManager {
$cell.focus();
this.highlightRowColumnHeader($cell);
this.scrollToCell($cell);
}
highlightRowColumnHeader($cell) {

View File

@ -174,6 +174,8 @@ export default class CellManager {
return;
}
this.scrollToCell($cell);
this.deactivateEditing();
if (!skipClearSelection) {
this.clearSelection();
@ -190,7 +192,6 @@ export default class CellManager {
$cell.focus();
this.highlightRowColumnHeader($cell);
this.scrollToCell($cell);
}
highlightRowColumnHeader($cell) {