diff --git a/lib/client/key.js b/lib/client/key.js index c9dc9fde..3d19a624 100644 --- a/lib/client/key.js +++ b/lib/client/key.js @@ -156,17 +156,22 @@ var CloudCmd, Util, DOM; } function switchKey(event) { - var i, obj, name, isSelected, isDir, + var i, obj, name, isSelected, isDir, prev, next, current = Info.element, panel = Info.panel, path = Info.path, - prev = current.previousSibling, - next = current.nextSibling, lKeyCode = event.keyCode, shift = event.shiftKey, lAlt = event.altKey, ctrl = event.ctrlKey; + if (current) { + prev = current.previousSibling; + next = current.nextSibling; + } else { + console.trace(); + } + switch (lKeyCode) { case Key.TAB: DOM.changePanel()