Skip to content

Commit 7f32bdb

Browse files
committed
v9.4.3
Fixed jump with offset when bringing anchored element into focus
1 parent 23aa13f commit 7f32bdb

File tree

6 files changed

+13
-7
lines changed

6 files changed

+13
-7
lines changed

dist/js/smooth-scroll.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* smooth-scroll v9.4.2: Animate scrolling to anchor links
2+
* smooth-scroll v9.4.3: Animate scrolling to anchor links
33
* (c) 2016 Chris Ferdinandi
44
* MIT License
55
* http://github.com/cferdinandi/smooth-scroll
@@ -396,6 +396,8 @@
396396
anchorElem.style.outline = 'none';
397397
}
398398
}
399+
root.scrollTo( 0 , endLocation );
400+
399401
animateSettings.callback( anchor, toggle ); // Run callbacks after animation complete
400402
}
401403
};

dist/js/smooth-scroll.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/dist/js/smooth-scroll.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* smooth-scroll v9.4.2: Animate scrolling to anchor links
2+
* smooth-scroll v9.4.3: Animate scrolling to anchor links
33
* (c) 2016 Chris Ferdinandi
44
* MIT License
55
* http://github.com/cferdinandi/smooth-scroll
@@ -396,6 +396,8 @@
396396
anchorElem.style.outline = 'none';
397397
}
398398
}
399+
root.scrollTo( 0 , endLocation );
400+
399401
animateSettings.callback( anchor, toggle ); // Run callbacks after animation complete
400402
}
401403
};

0 commit comments

Comments
 (0)