From e40b747381faf97cb898184d584f85bbba0d1414 Mon Sep 17 00:00:00 2001 From: Nathan Friesen Date: Wed, 1 Aug 2018 16:00:27 -0500 Subject: [PATCH] fixes a bug where using the up/down arrow keys, or Page Up/Down buttons would cause an error on a grid with no data --- Keyboard.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Keyboard.js b/Keyboard.js index ed686e7e1..c6192aaee 100644 --- a/Keyboard.js +++ b/Keyboard.js @@ -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,