Skip to content

Commit

Permalink
#7236 scroll by page when focused cell is not set (#7249)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mariusz Jurowicz authored and scottdraves committed Apr 26, 2018
1 parent a781bec commit eaccfc2
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 eaccfc2

Please sign in to comment.