Skip to content

Commit

Permalink
Fix docs auto-scroll issue
Browse files Browse the repository at this point in the history
  • Loading branch information
williamngan committed Aug 13, 2018
1 parent 09c6378 commit 764d816
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions docs/js/doc.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ var app = new Vue({
document.querySelector("#contents").scrollTo(0,0);
return;
}

let elem = document.getElementById(id);
if (elem) {
elem.scrollIntoView(true);
Expand Down Expand Up @@ -229,8 +228,6 @@ function loadContents( id, hash, reloading ) {

app.selected = id;
app.selHash = hash;

app.jumpTo( hash, reloading );

if (!reloading) {
setHistory( id, hash );
Expand All @@ -239,6 +236,7 @@ function loadContents( id, hash, reloading ) {
setTimeout( function() {
document.getElementById("members").scrollTo(0,0);
document.getElementById("contents").scrollTo(0,0);
app.jumpTo( hash, reloading );
}, 100);
});
}
Expand Down

0 comments on commit 764d816

Please sign in to comment.