]> git.0d.be Git - panikdb.git/commitdiff
wiki: scroll to top on page load
authorFrédéric Péters <fpeters@0d.be>
Tue, 23 Jun 2020 16:54:51 +0000 (18:54 +0200)
committerFrédéric Péters <fpeters@0d.be>
Tue, 23 Jun 2020 16:54:51 +0000 (18:54 +0200)
panikdb/static/js/combo.wiki.js

index 4ae7aaf5a87433a52ec6e5336e466b03e763941a..21cfdc2a55f3e8f1123624ec4389fd7343e177b8 100644 (file)
@@ -501,6 +501,7 @@ function init_page() {
         if (push_history) history.pushState({}, '', href);
         $('body').removeClass('loading');
         $('#main-content').replaceWith($(html).find('#main-content'));
+        if (push_history) window.scroll(0, 0);
         init_page();
       },
       error: function() {