From 11e918dd50a6fed53eba06d58dc7316872dd3240 Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Fri, 22 Feb 2019 20:35:13 -0800 Subject: [PATCH] fix: fix keyboard shortcuts on thread (#1031) * fix: fix keyboard shortcuts on thread fixes #1029 * fix test --- .../shortcut/ScrollListShortcuts.html | 2 +- .../_components/virtualList/VirtualList.html | 6 ++-- tests/spec/025-shortcuts-status.js | 35 ++++++++++++++++++- 3 files changed, 38 insertions(+), 5 deletions(-) diff --git a/src/routes/_components/shortcut/ScrollListShortcuts.html b/src/routes/_components/shortcut/ScrollListShortcuts.html index f4b2346..d8fa93f 100644 --- a/src/routes/_components/shortcut/ScrollListShortcuts.html +++ b/src/routes/_components/shortcut/ScrollListShortcuts.html @@ -15,7 +15,7 @@ export default { data: () => ({ scope: 'global', - itemToKey: (item) => item.key, + itemToKey: (item) => item, keyToElement: (key) => { return document.querySelector(`[shortcut-key=${JSON.stringify(key)}]`) }, diff --git a/src/routes/_components/virtualList/VirtualList.html b/src/routes/_components/virtualList/VirtualList.html index 1dd3675..dd515fd 100644 --- a/src/routes/_components/virtualList/VirtualList.html +++ b/src/routes/_components/virtualList/VirtualList.html @@ -18,8 +18,7 @@ {/if} - visibleItem.key} /> +