Notifications like button bugfix

This commit is contained in:
Noah Petherbridge 2023-06-17 00:42:28 +00:00
parent a98c218628
commit 16da91ce1e

View File

@ -427,7 +427,9 @@
{{$Like := $Root.PhotoLikeMap.Get $Body.PhotoID}} {{$Like := $Root.PhotoLikeMap.Get $Body.PhotoID}}
<a href="#" class="button is-small nonshy-like-button" <a href="#" class="button is-small nonshy-like-button"
data-table-name="photos" data-table-id="{{$Body.PhotoID}}" data-table-name="photos" data-table-id="{{$Body.PhotoID}}"
title="Like"> 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! -->
<span class="icon{{if $Like.UserLikes}} has-text-danger{{end}}"><i class="fa fa-heart"></i></span> <span class="icon{{if $Like.UserLikes}} has-text-danger{{end}}"><i class="fa fa-heart"></i></span>
<span class="nonshy-likes"> <span class="nonshy-likes">
Like Like
@ -522,4 +524,4 @@ document.addEventListener('DOMContentLoaded', () => {
}); });
}); });
</script> </script>
{{end}} {{end}}