fix(frontend): open original only when tapping the preview image
deploy / deploy (push) Successful in 1m24s
deploy / deploy (push) Successful in 1m24s
The preview area was one big link, so a click anywhere in it — including the black letterbox margins — opened the original. Make the link pointer-events:none and re-enable pointer-events on the image itself, so "open original" fires only on the image, not the surrounding margins. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -760,15 +760,17 @@
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Whole preview area is a link: click opens the original in a new tab. */
|
||||
/* The link fills the area for centring, but only the image itself is
|
||||
clickable (pointer-events below) — tapping the black margins does nothing,
|
||||
so "open original" fires only on the preview. */
|
||||
.preview-link {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: zoom-in;
|
||||
text-decoration: none;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.preview-img {
|
||||
@@ -776,6 +778,8 @@
|
||||
max-height: 100%;
|
||||
object-fit: contain;
|
||||
display: block;
|
||||
cursor: zoom-in;
|
||||
pointer-events: auto; /* only the image opens the original */
|
||||
}
|
||||
|
||||
.preview-busy {
|
||||
|
||||
Reference in New Issue
Block a user