Skip to content

Commit

Permalink
fix(scroll): make negative offsets possible
Browse files Browse the repository at this point in the history
  • Loading branch information
BowlingX committed Aug 19, 2016
1 parent 61619c4 commit 51c330b
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/main/util/Util.js
Original file line number Diff line number Diff line change
Expand Up @@ -358,11 +358,9 @@ class Util {
if (typeof thisOffset === 'function') {
thisOffset = optionalOffset();
}
if (thisOffset > 0) {
const scrolledY = window.pageYOffset;
if (scrolledY) {
window.scroll(0, scrolledY - thisOffset);
}
const scrolledY = window.pageYOffset;
if (scrolledY) {
window.scroll(0, scrolledY - thisOffset);
}
}
}
Expand Down

0 comments on commit 51c330b

Please sign in to comment.