You've already forked immich
mirror of
https://github.com/immich-app/immich.git
synced 2025-06-27 05:11:11 +02:00
refactor(web): remove events from clickOutside action (#9943)
This commit is contained in:
@ -8,6 +8,7 @@
|
||||
export let y = 0;
|
||||
|
||||
export let menuElement: HTMLDivElement | undefined = undefined;
|
||||
export let onClose: (() => void) | undefined = undefined;
|
||||
|
||||
let left: number;
|
||||
let top: number;
|
||||
@ -36,9 +37,7 @@
|
||||
style:top="{top}px"
|
||||
style:left="{left}px"
|
||||
role="menu"
|
||||
use:clickOutside
|
||||
on:outclick
|
||||
on:escape
|
||||
use:clickOutside={{ onOutclick: onClose, onEscape: onClose }}
|
||||
>
|
||||
<div class="flex flex-col rounded-lg">
|
||||
<slot />
|
||||
|
@ -49,14 +49,7 @@
|
||||
on:contextmenu|preventDefault={reopenContextMenu}
|
||||
role="presentation"
|
||||
>
|
||||
<ContextMenu
|
||||
{x}
|
||||
{y}
|
||||
{direction}
|
||||
on:outclick={closeContextMenu}
|
||||
on:escape={closeContextMenu}
|
||||
bind:menuElement={contextMenuElement}
|
||||
>
|
||||
<ContextMenu {x} {y} {direction} onClose={closeContextMenu} bind:menuElement={contextMenuElement}>
|
||||
<slot />
|
||||
</ContextMenu>
|
||||
</section>
|
||||
|
Reference in New Issue
Block a user