mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-18 01:02:23 +00:00
Address Stories review feedback
This commit is contained in:
1 parent
2edcd5bc69
commit
fec84dbf78
48 files changed
+783
-232
No files matched your search
@@ -284,9 +284,23 @@ onBeforeUnmount(() => {
|
||||
removeEventListener('keydown', onKey, true);
|
||||
unguardKeys?.();
|
||||
});
|
||||
watch(mode, (m) => {
|
||||
if (m === 'closed') requestAnimationFrame(placeEntry);
|
||||
else popOpen.value = false;
|
||||
let returnFocus = null;
|
||||
watch(mode, (m, previous) => {
|
||||
if (m === 'closed') {
|
||||
requestAnimationFrame(placeEntry);
|
||||
nextTick(() => {
|
||||
if (mode.value !== 'closed') return;
|
||||
const entry = rootEl.value?.querySelector('#hStories');
|
||||
const target = returnFocus?.isConnected && returnFocus !== document.body
|
||||
? returnFocus
|
||||
: entry;
|
||||
target?.focus({ preventScroll: true });
|
||||
returnFocus = null;
|
||||
});
|
||||
} else {
|
||||
if (previous === 'closed') returnFocus = document.activeElement;
|
||||
popOpen.value = false;
|
||||
}
|
||||
});
|
||||
// Each screen (and each story, keyed) mounts its own map slot.
|
||||
watch([mode, storyId], () => nextTick(watchCredit));
|
||||
|
||||
Reference in new issue
Block a user