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:
Alex 2023-03-04 16:09:55 -06:00 committed by GitHub
parent bdf35b6688
commit 1918625be9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 1066 additions and 721 deletions

View file

@ -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;