fix: meta+click on thumbnail (#18648)

This commit is contained in:
Alex 2025-05-26 14:58:46 -05:00 committed by GitHub
parent 9557395991
commit 118dc8cf5a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -104,8 +104,10 @@
const handleClick = (e: MouseEvent) => { const handleClick = (e: MouseEvent) => {
if (e.ctrlKey || e.metaKey) { if (e.ctrlKey || e.metaKey) {
window.open(currentUrlReplaceAssetId(asset.id), '_blank');
return; return;
} }
e.stopPropagation(); e.stopPropagation();
e.preventDefault(); e.preventDefault();
callClickHandlers(); callClickHandlers();
@ -249,19 +251,6 @@
> >
<!-- icon overlay --> <!-- icon overlay -->
<div> <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 --> <!-- Gradient overlay on hover -->
{#if !usingMobileDevice && !disabled} {#if !usingMobileDevice && !disabled}
<div <div
@ -320,6 +309,20 @@
</div> </div>
{/if} {/if}
</div> </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 <ImageThumbnail
class={imageClass} class={imageClass}
{brokenAssetClass} {brokenAssetClass}