Skip to content

Commit

Permalink
Don't try setting negative scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
mjbvz committed Feb 26, 2018
1 parent 4af7c2e commit 49ef0ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion extensions/markdown/media/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
} else {
scrollTo = previous.element.getBoundingClientRect().top;
}
window.scroll(0, window.scrollY + scrollTo + getSourceRevealAddedOffset());
window.scroll(0, Math.max(1, window.scrollY + scrollTo + getSourceRevealAddedOffset()));
}
}

Expand Down

0 comments on commit 49ef0ec

Please sign in to comment.