Comparing version 1.0.6 to 1.0.7
# Changelog | ||
## 1.0.7 | ||
- Ensure stable sort of `tabindex`ed elements even in browsers that have an unstable `Array.prototype.sort`. | ||
## 1.0.6 | ||
@@ -4,0 +8,0 @@ |
@@ -38,2 +38,3 @@ module.exports = function(el) { | ||
orderedTabbables.push({ | ||
index: i, | ||
tabIndex: candidateIndex, | ||
@@ -47,3 +48,3 @@ node: candidate, | ||
.sort(function(a, b) { | ||
return a.tabIndex - b.tabIndex; | ||
return a.tabIndex === b.tabIndex ? a.index - b.index : a.tabIndex - b.tabIndex; | ||
}) | ||
@@ -50,0 +51,0 @@ .map(function(a) { |
{ | ||
"name": "tabbable", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"description": "Returns an array of all tabbable DOM nodes within a containing node.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
130856
105