Commit e26f5ac998036e23483cbf22e180256336724d14

Authored by Victor Costa
1 parent 783761d8

Fix scrolling when click on login

Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
@@ -802,7 +802,6 @@ define(['jquery', 'handlebars', 'fastclick', 'handlebars_helpers', 'piwik'], fun @@ -802,7 +802,6 @@ define(['jquery', 'handlebars', 'fastclick', 'handlebars_helpers', 'piwik'], fun
802 e.preventDefault(); 802 e.preventDefault();
803 803
804 $loginPanel.toggle(); 804 $loginPanel.toggle();
805 - $('html, body').animate({scrollTop: 0}, 'fast');  
806 }); 805 });
807 806
808 // handle click on elsewhere (out of loginPanel) 807 // handle click on elsewhere (out of loginPanel)
@@ -1155,6 +1154,7 @@ define(['jquery', 'handlebars', 'fastclick', 'handlebars_helpers', 'piwik'], fun @@ -1155,6 +1154,7 @@ define(['jquery', 'handlebars', 'fastclick', 'handlebars_helpers', 'piwik'], fun
1155 var $bt = $(this); 1154 var $bt = $(this);
1156 if(!logged_in) { 1155 if(!logged_in) {
1157 $('#login-button').click(); 1156 $('#login-button').click();
  1157 + $('html, body').animate({scrollTop: 0}, 'fast');
1158 } else { 1158 } else {
1159 $.ajax({ 1159 $.ajax({
1160 type: 'post', 1160 type: 'post',