[HTML] Use a clickable <div> instead of <a> for reply reference link

Fixes #546
pull/607/head
Tyrrrz 3 years ago
parent baac419538
commit ce2dedff6b

@ -244,16 +244,17 @@ img {
flex-grow: 1; flex-grow: 1;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} cursor: pointer;
.chatlog__reference-link:hover {
text-decoration: none;
} }
.chatlog__reference-content > * { .chatlog__reference-content > * {
display: inline; display: inline;
} }
.chatlog__reference-content > a:hover {
text-decoration: none;
}
.chatlog__reference-edited-timestamp { .chatlog__reference-edited-timestamp {
margin-left: 0.25em; margin-left: 0.25em;
font-size: 0.8em; font-size: 0.8em;

@ -54,7 +54,7 @@
{ {
<img class="chatlog__reference-avatar" src="@await ResolveUrlAsync(Model.MessageGroup.ReferencedMessage.Author.AvatarUrl)" alt="Avatar"> <img class="chatlog__reference-avatar" src="@await ResolveUrlAsync(Model.MessageGroup.ReferencedMessage.Author.AvatarUrl)" alt="Avatar">
<span class="chatlog__reference-name" title="@Model.MessageGroup.ReferencedMessage.Author.FullName" style="@referencedUserColorStyle">@referencedUserNick</span> <span class="chatlog__reference-name" title="@Model.MessageGroup.ReferencedMessage.Author.FullName" style="@referencedUserColorStyle">@referencedUserNick</span>
<a class="chatlog__reference-link" href="#" onclick="scrollToMessage(event, '@Model.MessageGroup.ReferencedMessage.Id')"> <div class="chatlog__reference-link" onclick="scrollToMessage(event, '@Model.MessageGroup.ReferencedMessage.Id')">
<span class="chatlog__reference-content"> <span class="chatlog__reference-content">
@if (!string.IsNullOrWhiteSpace(Model.MessageGroup.ReferencedMessage.Content)) @if (!string.IsNullOrWhiteSpace(Model.MessageGroup.ReferencedMessage.Content))
{ {
@ -70,7 +70,7 @@
{ {
<span class="chatlog__reference-edited-timestamp" title="@FormatDate(Model.MessageGroup.ReferencedMessage.EditedTimestamp.Value)">(edited)</span> <span class="chatlog__reference-edited-timestamp" title="@FormatDate(Model.MessageGroup.ReferencedMessage.EditedTimestamp.Value)">(edited)</span>
} }
</a> </div>
} }
else else
{ {

Loading…
Cancel
Save