Skip to content

Commit d338352

Browse files
committed
scroll Ui to top of page on page loads, closes mitreid-connect#977
1 parent aa878cc commit d338352

File tree

1 file changed

+5
-0
lines changed
  • openid-connect-server-webapp/src/main/webapp/resources/js

1 file changed

+5
-0
lines changed

openid-connect-server-webapp/src/main/webapp/resources/js/admin.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,6 +1002,11 @@ $(function () {
10021002
$.ajaxSetup({cache:false});
10031003
app = new AppRouter();
10041004

1005+
app.on('route', function(name, args) {
1006+
// scroll to top of page on new route selection
1007+
$("html, body").animate({ scrollTop: 0 }, "slow");
1008+
});
1009+
10051010
// grab all hashed URLs and send them through the app router instead
10061011
$(document).on('click', 'a[href^="manage/#"]', function(event) {
10071012
event.preventDefault();

0 commit comments

Comments
 (0)