updated overlay panel autofocus

This commit is contained in:
Gani Georgiev
2023-04-14 15:28:24 +03:00
parent 53c735d00b
commit 0351f3a1ad
31 changed files with 148 additions and 127 deletions
+3 -3
View File
@@ -98,12 +98,12 @@
if (newState) {
oldFocusedElem = document.activeElement;
wrapper?.focus();
dispatch("show");
wrapper?.focus();
} else {
clearTimeout(contentScrollThrottle);
oldFocusedElem?.focus();
dispatch("hide");
oldFocusedElem?.focus();
}
await tick();
@@ -219,7 +219,7 @@
<svelte:window on:resize={handleResize} on:keydown={handleEscPress} />
<div bind:this={wrapper} class="overlay-panel-wrapper">
<div bind:this={wrapper} class="overlay-panel-wrapper" tabindex="-1">
{#if active}
<div class="overlay-panel-container" class:padded={popup} class:active>
<!-- svelte-ignore a11y-click-events-have-key-events -->