UX: remove trapFocus as it causes bugs

This commit is contained in:
Pieter Vander Vennet 2024-06-16 13:09:13 +02:00
parent 72d10863b8
commit 19c57ffce0
4 changed files with 2 additions and 8 deletions

View file

@ -1,8 +1,6 @@
<script lang="ts">
import { createEventDispatcher } from "svelte"
import { XCircleIcon } from "@rgossiaux/svelte-heroicons/solid"
import { twMerge } from "tailwind-merge"
import { trapFocus } from "trap-focus-svelte"
import { ariaLabel } from "../../Utils/ariaLabel"
import Translations from "../i18n/Translations"
@ -25,7 +23,6 @@
<div
class={"absolute bottom-0 right-0 h-full w-screen p-4 md:p-6"}
style="z-index: 21"
use:trapFocus
>
<div class="content normal-background h-full" on:click|stopPropagation={() => {}}>
<div class="h-full rounded-xl">

View file

@ -1,7 +1,6 @@
<script lang="ts">
import { createEventDispatcher } from "svelte"
import { XCircleIcon } from "@rgossiaux/svelte-heroicons/solid"
import { trapFocus } from "trap-focus-svelte"
/**
* The slotted element will be shown on the right side
@ -17,7 +16,6 @@
style="max-width: 100vw; max-height: 100vh"
tabindex="-1"
id="modal-right"
use:trapFocus
>
<slot name="close-button">
<button

View file

@ -452,7 +452,7 @@
{/if}
<If condition={state.previewedImage.map((i) => i !== undefined)}>
<FloatOver extraClasses="p-1" on:close={() => state.previewedImage.setData(undefined)}>
<FloatOver on:close={() => state.previewedImage.setData(undefined)}>
<button
class="absolute right-4 top-4 h-8 w-8 rounded-full p-0"
on:click={() => previewedImage.setData(undefined)}