mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-02-22 15:15:12 +08:00
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:
parent
65bf4f7763
commit
705200a138
1 changed files with 4 additions and 3 deletions
|
@ -81,7 +81,8 @@ class FocusedContentStore
|
|||
return if @_keyboardCursor[collection]?.id is item?.id
|
||||
|
||||
@_keyboardCursor[collection] = item
|
||||
@trigger({ impactsCollection: (c) -> c is collection })
|
||||
window.requestAnimationFrame =>
|
||||
@trigger({ impactsCollection: (c) -> c is collection })
|
||||
|
||||
_onFocus: ({collection, item}) =>
|
||||
throw new Error("focus() requires a collection") unless collection
|
||||
|
@ -89,8 +90,8 @@ class FocusedContentStore
|
|||
|
||||
@_focused[collection] = item
|
||||
@_keyboardCursor[collection] = item if item
|
||||
|
||||
@trigger({ impactsCollection: (c) -> c is collection })
|
||||
window.requestAnimationFrame =>
|
||||
@trigger({ impactsCollection: (c) -> c is collection })
|
||||
|
||||
_onWorkspaceChange: =>
|
||||
keyboardCursorEnabled = WorkspaceStore.layoutMode() is 'list'
|
||||
|
|
Loading…
Reference in a new issue