mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-23 05:33:02 +02:00
Update affix properly on scrollspy speedy scroll to top of page #11310
Fix scrollspy.js so as affix is updated properly when user scrolls fast to top of page. A fix for issue #11310.
This commit is contained in:
@@ -84,6 +84,10 @@
|
||||
return activeTarget != (i = targets.last()[0]) && this.activate(i)
|
||||
}
|
||||
|
||||
if (activeTarget && scrollTop <= offsets[0]) {
|
||||
return activeTarget != (i = targets.first()[0]) && this.activate(i)
|
||||
}
|
||||
|
||||
for (i = offsets.length; i--;) {
|
||||
activeTarget != targets[i]
|
||||
&& scrollTop >= offsets[i]
|
||||
|
Reference in New Issue
Block a user