Commit c92b6e66 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Scroll to awards after adding emoji-award comment

This makes it more intuitive, as user can see that something actually
happened after adding emoji-only comment in long discussions.
parent ba08811d
......@@ -89,3 +89,8 @@ class @AwardsHandler
findEmojiIcon: (emoji) ->
$(".icon[data-emoji='" + emoji + "']")
scrollToAwards: ->
$('body, html').animate({
scrollTop: $('.awards').offset().top - 80
}, 200)
......@@ -122,6 +122,7 @@ class @Notes
if note.award
awards_handler.addAwardToEmojiBar(note.note, note.emoji_path)
awards_handler.scrollToAwards()
###
Check if note does not exists on page
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment