mirror of
https://github.com/open-webui/open-webui
synced 2025-06-26 18:26:48 +00:00
use svelte-focus-trap in modal
This commit is contained in:
parent
f56983632f
commit
54b30e0b7f
@ -3,7 +3,7 @@
|
|||||||
import { fade } from 'svelte/transition';
|
import { fade } from 'svelte/transition';
|
||||||
|
|
||||||
import { flyAndScale } from '$lib/utils/transitions';
|
import { flyAndScale } from '$lib/utils/transitions';
|
||||||
|
import { focusTrap } from 'svelte-focus-trap'
|
||||||
export let show = true;
|
export let show = true;
|
||||||
export let size = 'md';
|
export let size = 'md';
|
||||||
export let containerClassName = 'p-3';
|
export let containerClassName = 'p-3';
|
||||||
@ -66,6 +66,7 @@
|
|||||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||||
<div
|
<div
|
||||||
bind:this={modalElement}
|
bind:this={modalElement}
|
||||||
|
use:focusTrap
|
||||||
class="modal fixed top-0 right-0 left-0 bottom-0 bg-black/60 w-full h-screen max-h-[100dvh] {containerClassName} flex justify-center z-9999 overflow-y-auto overscroll-contain"
|
class="modal fixed top-0 right-0 left-0 bottom-0 bg-black/60 w-full h-screen max-h-[100dvh] {containerClassName} flex justify-center z-9999 overflow-y-auto overscroll-contain"
|
||||||
in:fade={{ duration: 10 }}
|
in:fade={{ duration: 10 }}
|
||||||
on:mousedown={() => {
|
on:mousedown={() => {
|
||||||
|
Loading…
Reference in New Issue
Block a user