Keyboard: Fix error when calling focus() on an empty grid