Skip to content

Commit

Permalink
#7236 scroll by page when focused cell is not set
Browse files Browse the repository at this point in the history
  • Loading branch information
Mariusz Jurowicz committed Apr 26, 2018
1 parent 63eb614 commit 21c12e1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion js/notebook/src/tableDisplay/dataGrid/event/EventManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,11 @@ export default class EventManager {
return;
}

this.dataGrid.cellFocusManager.setFocusedCellByNavigationKey(code);
if (this.dataGrid.cellFocusManager.focusedCellData) {
this.dataGrid.cellFocusManager.setFocusedCellByNavigationKey(code);
} else if (code === KEYBOARD_KEYS.PageDown || code === KEYBOARD_KEYS.PageUp) {
this.dataGrid.scrollByPage(code === KEYBOARD_KEYS.PageUp ? 'up' : 'down');
}

if (event.shiftKey) {
this.dataGrid.cellSelectionManager.setEndCell(
Expand Down

0 comments on commit 21c12e1

Please sign in to comment.