Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions src/nodes/ImageView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@
<div
v-if="isMediaAttachment"
contenteditable="false"
class="media"
@click="handleAttachmentClick">
<div class="media__wrapper">
class="media">
<div
class="media__wrapper clickable"
@click="handleAttachmentClick">
Comment on lines +27 to +29

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about using an <a> tag instead. That seems semantically closer to what the element is.
The href could even point to the url handleAttachmentClick opens if it does not open the viewer.

<img
v-show="loaded"
:src="imageUrl"
Expand Down Expand Up @@ -53,7 +54,7 @@
v-show="loaded"
:src="imageUrl"
:alt="alt"
class="image__main"
class="image__main clickable"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe also turn the surounding <div> into an <a> and move the click handler there?

@click="handleImageClick"
@load="onLoaded" />
</div>
Expand Down Expand Up @@ -552,6 +553,14 @@ export default {
justify-content: left;
padding-bottom: 0;

.clickable {
cursor: pointer;

* {
cursor: pointer;
}
}

.media__wrapper {
display: flex;
border: 2px solid var(--color-border);
Expand Down Expand Up @@ -579,6 +588,7 @@ export default {
}
}
}

.buttons {
margin-left: 8px;
}
Expand Down
Loading