mirror of
https://github.com/immich-app/immich
synced 2026-08-15 13:03:57 +00:00
fix: disable drag on logo image element directly
This commit is contained in:
parent
03cf7c33ed
commit
32cff0d769
1 changed files with 16 additions and 1 deletions
|
|
@ -45,6 +45,10 @@
|
|||
});
|
||||
|
||||
const { Cast } = $derived(getGlobalActions($t));
|
||||
|
||||
const preventLogoDrag = (node: HTMLElement) => {
|
||||
node.querySelector('img')?.setAttribute('draggable', 'false');
|
||||
};
|
||||
</script>
|
||||
|
||||
<svelte:window bind:innerWidth />
|
||||
|
|
@ -80,7 +84,8 @@
|
|||
data-sveltekit-preload-data="hover"
|
||||
href={Route.photos()}
|
||||
draggable="false"
|
||||
ondragstart={(event) => event.preventDefault()}
|
||||
class="logo-link"
|
||||
use:preventLogoDrag
|
||||
>
|
||||
<Logo variant={mediaQueryManager.isFullSidebar ? 'inline' : 'icon'} class="max-md:h-12" />
|
||||
</a>
|
||||
|
|
@ -190,3 +195,13 @@
|
|||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<style>
|
||||
.logo-link,
|
||||
.logo-link :global(img) {
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue