utility.js: replace Utility.scroll_to with Element.scrollIntoView.

https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView
https://caniuse.com/#feat=scrollintoview
This commit is contained in:
evazion
2018-08-16 22:03:50 -05:00
parent ad056e69d5
commit dfffabd662
5 changed files with 4 additions and 28 deletions

View File

@@ -39,7 +39,7 @@ Comment.show_new_comment_form = function(e) {
$(e.target).hide();
var $form = $(e.target).closest("div.new-comment").find("form");
$form.show();
Utility.scroll_to($form);
$form[0].scrollIntoView(false);
e.preventDefault();
}