FIX: Automatic scrolling in PM not working.

See https://stackoverflow.com/questions/18779708/scrolltop-with-animate-not-working
This commit is contained in:
Guo Xiang Tan 2019-04-22 10:52:46 +08:00
parent 7b7c86461f
commit caeb035b61
1 changed files with 1 additions and 1 deletions

View File

@ -1301,7 +1301,7 @@ export default Ember.Controller.extend(bufferedProperty("model"), {
if ($post.length === 0 || isElementInViewport($post)) return; if ($post.length === 0 || isElementInViewport($post)) return;
$("body").animate({ scrollTop: $post.offset().top }, 1000); $("html, body").animate({ scrollTop: $post.offset().top }, 1000);
}, 500), }, 500),
unsubscribe() { unsubscribe() {