Address Stories review feedback

This commit is contained in:
Manjunath committed 2026-11-16 22:35:07 +05:30
1 parent 2edcd5bc69
commit fec84dbf78
48 files changed
+783 -232

No files matched your search

+17 -3
View File
@@ -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));