mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
fix(web): nested layout navigation issue (#1936)
* fix(web): nested layout navigation issue * move guarding to html template * fix test
This commit is contained in:
parent
bdf35b6688
commit
1918625be9
4 changed files with 1066 additions and 721 deletions
|
|
@ -1,16 +1,17 @@
|
|||
<script lang="ts">
|
||||
import { fade } from 'svelte/transition';
|
||||
import ImmichLogo from './immich-logo.svelte';
|
||||
|
||||
export let dropHandler: (event: DragEvent) => void;
|
||||
|
||||
let dragStartTarget: EventTarget | null = null;
|
||||
|
||||
const handleDragEnter = (e: DragEvent) => {
|
||||
dragStartTarget = e.target;
|
||||
};
|
||||
</script>
|
||||
|
||||
<svelte:body
|
||||
on:dragenter|stopPropagation|preventDefault={(e) => {
|
||||
dragStartTarget = e.target;
|
||||
}}
|
||||
on:dragenter|stopPropagation|preventDefault={handleDragEnter}
|
||||
on:dragleave|stopPropagation|preventDefault={(e) => {
|
||||
if (dragStartTarget === e.target) {
|
||||
dragStartTarget = null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue