From e212f62e891b0a94ee0899881df3e2fc28b490e5 Mon Sep 17 00:00:00 2001 From: Thibaut Courouble Date: Sat, 9 Sep 2017 11:37:26 -0400 Subject: [PATCH] Fix issue when hitting left-arrow keyboard shortcut on a disabled and unversioned doc --- assets/javascripts/views/list/list_focus.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/javascripts/views/list/list_focus.coffee b/assets/javascripts/views/list/list_focus.coffee index 3be0d2b5..80881019 100644 --- a/assets/javascripts/views/list/list_focus.coffee +++ b/assets/javascripts/views/list/list_focus.coffee @@ -102,7 +102,8 @@ class app.views.ListFocus extends app.View onLeft: => cursor = @getCursor() if cursor and not cursor.classList.contains(app.views.ListFold.activeClass) and cursor.parentNode isnt @el - @focusOnNextFrame cursor.parentNode.previousSibling + prev = cursor.parentNode.previousSibling + @focusOnNextFrame cursor.parentNode.previousSibling if prev and prev.classList.contains(app.views.ListFold.targetClass) return onEnter: =>