Skip to content

High performance self-hosted photo and video management solution.

fix: meta+click on thumbnail (#18648)

Alex118dc8cf5a2c
diff --git a/web/src/lib/components/assets/thumbnail/thumbnail.svelte b/web/src/lib/components/assets/thumbnail/thumbnail.svelte
index eb8b15c4b5..6ccf360375 100644
--- a/web/src/lib/components/assets/thumbnail/thumbnail.svelte
+++ b/web/src/lib/components/assets/thumbnail/thumbnail.svelte
@@ -104,8 +104,10 @@
const handleClick = (e: MouseEvent) => {
if (e.ctrlKey || e.metaKey) {
+ window.open(currentUrlReplaceAssetId(asset.id), '_blank');
return;
}
+
e.stopPropagation();
e.preventDefault();
callClickHandlers();
@@ -249,19 +251,6 @@
>
<!-- icon overlay -->
<div>
- {#if !usingMobileDevice && mouseOver && !disableLinkMouseOver}
- <!-- lazy show the url on mouse over-->
- <a
- class="absolute w-full top-0 bottom-0"
- style:cursor="unset"
- href={currentUrlReplaceAssetId(asset.id)}
- onclick={(evt) => evt.preventDefault()}
- tabindex={-1}
- aria-label="Thumbnail URL"
- >
- </a>
- {/if}
-
<!-- Gradient overlay on hover -->
{#if !usingMobileDevice && !disabled}
<div
@@ -320,6 +309,20 @@
</div>
{/if}
</div>
+
+ <!-- lazy show the url on mouse over-->
+ {#if !usingMobileDevice && mouseOver && !disableLinkMouseOver}
+ <a
+ class="absolute w-full top-0 bottom-0"
+ style:cursor="unset"
+ href={currentUrlReplaceAssetId(asset.id)}
+ onclick={(evt) => evt.preventDefault()}
+ tabindex={-1}
+ aria-label="Thumbnail URL"
+ >
+ </a>
+ {/if}
+
<ImageThumbnail
class={imageClass}
{brokenAssetClass}