diff --git a/web/src/lib/actions/click-outside.ts b/web/src/lib/actions/click-outside.ts index ddb648a4f2484..bbcb0c405b718 100644 --- a/web/src/lib/actions/click-outside.ts +++ b/web/src/lib/actions/click-outside.ts @@ -1,19 +1,12 @@ import { matchesShortcut } from '$lib/actions/shortcut'; import type { ActionReturn } from 'svelte/action'; -interface Attributes { - /** @deprecated */ - 'on:outclick'?: (e: CustomEvent) => void; - /** @deprecated **/ - 'on:escape'?: (e: CustomEvent) => void; -} - interface Options { onOutclick?: () => void; onEscape?: () => void; } -export function clickOutside(node: HTMLElement, options: Options = {}): ActionReturn { +export function clickOutside(node: HTMLElement, options: Options = {}): ActionReturn { const { onOutclick, onEscape } = options; const handleClick = (event: MouseEvent) => { @@ -22,11 +15,7 @@ export function clickOutside(node: HTMLElement, options: Options = {}): ActionRe return; } - if (onOutclick) { - onOutclick(); - } else { - node.dispatchEvent(new CustomEvent('outclick')); - } + onOutclick?.(); }; const handleKey = (event: KeyboardEvent) => { @@ -37,8 +26,6 @@ export function clickOutside(node: HTMLElement, options: Options = {}): ActionRe if (onEscape) { event.stopPropagation(); onEscape(); - } else { - node.dispatchEvent(new CustomEvent('escape')); } }; diff --git a/web/src/lib/components/album-page/share-info-modal.svelte b/web/src/lib/components/album-page/share-info-modal.svelte index 6856b0b357b4c..be47f4e2580a9 100644 --- a/web/src/lib/components/album-page/share-info-modal.svelte +++ b/web/src/lib/components/album-page/share-info-modal.svelte @@ -126,7 +126,7 @@ /> {#if selectedMenuUser === user} - (selectedMenuUser = null)}> + (selectedMenuUser = null)}> {#if role === AlbumUserRole.Viewer} handleSetReadonly(user, AlbumUserRole.Editor)} text="Allow edits" /> {:else} diff --git a/web/src/lib/components/asset-viewer/activity-viewer.svelte b/web/src/lib/components/asset-viewer/activity-viewer.svelte index 0e4b61080ba4d..bb1a50c2f9ec1 100644 --- a/web/src/lib/components/asset-viewer/activity-viewer.svelte +++ b/web/src/lib/components/asset-viewer/activity-viewer.svelte @@ -201,8 +201,7 @@