fix(focused-content): Prevent keydowns from outpacing animation frames, improves keyboard move speed through thread list

To reproduce previous issue, turn key rpeat speed all the way up and then hold an arrow key.
This commit is contained in:
Ben Gotow 2015-09-28 01:16:52 -07:00
parent 65bf4f7763
commit 705200a138

View file

@ -81,6 +81,7 @@ class FocusedContentStore
return if @_keyboardCursor[collection]?.id is item?.id
@_keyboardCursor[collection] = item
window.requestAnimationFrame =>
@trigger({ impactsCollection: (c) -> c is collection })
_onFocus: ({collection, item}) =>
@ -89,7 +90,7 @@ class FocusedContentStore
@_focused[collection] = item
@_keyboardCursor[collection] = item if item
window.requestAnimationFrame =>
@trigger({ impactsCollection: (c) -> c is collection })
_onWorkspaceChange: =>