0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-01 13:24:25 +01:00
Bootstrap/js
Caden Lovelace a1aa0f8afd Handle multiple zero-offset Scrollspy elements.
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.
2015-03-01 23:55:39 +00:00
..
tests Handle multiple zero-offset Scrollspy elements. 2015-03-01 23:55:39 +00:00
.jscsrc Update JSCS config for the new version. 2015-01-16 17:49:58 +02:00
.jshintrc Revert UMD (#13772 & friends) for now, due to #13812. 2014-06-23 11:11:59 -07:00
affix.js [Ref #15881] Use Explicit Values rather than Chain 2015-02-25 12:19:11 -05:00
alert.js bump versions 2015-01-19 08:32:13 -08:00
button.js bump versions 2015-01-19 08:32:13 -08:00
carousel.js [Ref #15881] Use Explicit Values rather than Chain 2015-02-25 12:19:11 -05:00
collapse.js bump versions 2015-01-19 08:32:13 -08:00
dropdown.js Dropdowns: Skip .disabled instead of .divider on keydown event 2015-02-26 06:42:09 +01:00
modal.js Modal: Apply any preexisting body padding again after closing 2015-02-26 08:02:06 +01:00
popover.js tip method in popover.js can be removed 2015-01-29 11:21:07 +08:00
scrollspy.js Handle multiple zero-offset Scrollspy elements. 2015-03-01 23:55:39 +00:00
tab.js Fix error in condition in Tab plugin 2015-01-21 14:13:26 -08:00
tooltip.js Tooltip: Avoid creating an unnecessary tooltip when Tooltip#hide is called 2015-02-26 06:53:58 +01:00
transition.js bump versions 2015-01-19 08:32:13 -08:00