From c9ca605cfefba6b0c0f9cb96426802c516ebdeab Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Sat, 23 Feb 2019 09:47:36 -0800 Subject: [PATCH] fix: fix keyboard shortcuts for pinned toots (#1033) * fix: fix keyboard shortcuts for pinned toots fixes #908 * fix test --- src/routes/_components/list/List.html | 5 +-- .../shortcut/ScrollListShortcuts.html | 43 +++++++------------ .../_components/status/Notification.html | 18 ++++---- src/routes/_components/status/Status.html | 26 +++++------ .../status/StatusMediaAttachments.html | 4 +- .../_components/status/StatusSpoiler.html | 4 +- .../_components/status/StatusToolbar.html | 8 ++-- .../timeline/NotificationVirtualListItem.html | 2 +- .../_components/timeline/PinnedStatuses.html | 23 +++++++--- .../timeline/StatusVirtualListItem.html | 2 +- src/routes/_components/timeline/Timeline.html | 5 +++ .../_components/virtualList/VirtualList.html | 5 +-- src/routes/_utils/scrollIntoView.js | 6 +-- tests/spec/010-focus.js | 21 ++++----- tests/spec/025-shortcuts-status.js | 33 +++++++++++++- tests/spec/111-focus.js | 4 +- tests/utils.js | 9 +++- 17 files changed, 126 insertions(+), 92 deletions(-) diff --git a/src/routes/_components/list/List.html b/src/routes/_components/list/List.html index 7b814d4..0752e60 100644 --- a/src/routes/_components/list/List.html +++ b/src/routes/_components/list/List.html @@ -10,7 +10,6 @@ /> {/each} - \ No newline at end of file + diff --git a/src/routes/_components/timeline/StatusVirtualListItem.html b/src/routes/_components/timeline/StatusVirtualListItem.html index 4f7744c..8712fbc 100644 --- a/src/routes/_components/timeline/StatusVirtualListItem.html +++ b/src/routes/_components/timeline/StatusVirtualListItem.html @@ -2,7 +2,7 @@ timelineType={virtualProps.timelineType} timelineValue={virtualProps.timelineValue} focusSelector={virtualProps.focusSelector} - shortcutScope={virtualKey} + enableShortcuts={true} index={virtualIndex} length={virtualLength} on:recalculateHeight /> diff --git a/src/routes/_components/timeline/Timeline.html b/src/routes/_components/timeline/Timeline.html index 8317e55..07323f0 100644 --- a/src/routes/_components/timeline/Timeline.html +++ b/src/routes/_components/timeline/Timeline.html @@ -35,11 +35,13 @@
Error: component failed to load! Try reloading. {error}
{/await} + diff --git a/src/routes/_components/virtualList/VirtualList.html b/src/routes/_components/virtualList/VirtualList.html index dd515fd..843db73 100644 --- a/src/routes/_components/virtualList/VirtualList.html +++ b/src/routes/_components/virtualList/VirtualList.html @@ -18,7 +18,6 @@ {/if} -