Notifications: make the Like button a button to avoid hyperlink issue

face-detect
Noah Petherbridge 2023-06-21 18:36:42 -07:00
parent 8afcbbe2be
commit 2439c714e5
1 changed files with 3 additions and 5 deletions

View File

@ -425,11 +425,9 @@
{{if ne $Body.Photo.UserID $Root.CurrentUser.ID}}
<div class="mt-1">
{{$Like := $Root.PhotoLikeMap.Get $Body.PhotoID}}
<a href="#" class="button is-small nonshy-like-button"
<button type="button" class="button is-small nonshy-like-button"
data-table-name="photos" data-table-id="{{$Body.PhotoID}}"
title="Like" onclick="return false">
<!-- TODO: the return false above fixes a bug on mobile where it jumps to
the top of page, despite preventDefault() and it doesn't happen on desktop! -->
title="Like">
<span class="icon{{if $Like.UserLikes}} has-text-danger{{end}}"><i class="fa fa-heart"></i></span>
<span class="nonshy-likes">
Like
@ -437,7 +435,7 @@
({{$Like.Count}})
{{end}}
</span>
</a>
</button>
</div>
{{end}}
</div>