mirror of
https://github.com/Hopiu/bootstrap.git
synced 2026-03-19 22:10:24 +00:00
When the first two elements in a scrollspy content block have a document offset of zero (i.e. they're hard against the top of the page), Scrollspy would switch between them on every scroll event. This could happen, for example, in a system of nested sections: ``` <section id="animals"> <section id="dogs"> Content </section> </section> ``` This ocurred because Scrollspy's check to see if it's at the end of the array of sections uses `!arr[index]`. This misses the case where `arr[index]` does exist and is zero. This commit explicitly checks the array bounds. |
||
|---|---|---|
| .. | ||
| tests | ||
| .jscsrc | ||
| .jshintrc | ||
| affix.js | ||
| alert.js | ||
| button.js | ||
| carousel.js | ||
| collapse.js | ||
| dropdown.js | ||
| modal.js | ||
| popover.js | ||
| scrollspy.js | ||
| tab.js | ||
| tooltip.js | ||
| transition.js | ||