Skip to content

Commit

Permalink
fixes a bug where using the up/down arrow keys, or Page Up/Down butto…
Browse files Browse the repository at this point in the history
…ns would cause an error on a grid with no data (#1424)
  • Loading branch information
nmfriesen authored and edhager committed Sep 5, 2019
1 parent a8846ca commit 467160e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Keyboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,9 @@ define([
// Common functions used in default keyMap (called in instance context)

var moveFocusVertical = Keyboard.moveFocusVertical = function (event, steps) {
// if there is no _focusNode (for example, when the grid doesn't have data) don't try to find the next focus row/cell
if (!this._focusedNode) { return; }

var cellNavigation = this.cellNavigation,
target = this[cellNavigation ? 'cell' : 'row'](event),
columnId = cellNavigation && target.column.id,
Expand Down

0 comments on commit 467160e

Please sign in to comment.