@enact/spotlight
Advanced tools
Comparing version 2.2.7 to 2.2.8
@@ -5,2 +5,8 @@ # Change Log | ||
## [2.2.8] - 2018-12-06 | ||
### Fixed | ||
- `spotlight` to focus correctly within an overflow container in which the first element is another container without spottable children | ||
## [2.2.7] - 2018-11-21 | ||
@@ -7,0 +13,0 @@ |
{ | ||
"name": "@enact/spotlight", | ||
"version": "2.2.7", | ||
"version": "2.2.8", | ||
"description": "A focus management library", | ||
@@ -24,3 +24,3 @@ "main": "src/spotlight.js", | ||
"dependencies": { | ||
"@enact/core": "^2.2.7", | ||
"@enact/core": "^2.2.8", | ||
"prop-types": "^15.6.0", | ||
@@ -27,0 +27,0 @@ "ramda": "^0.24.1", |
@@ -810,8 +810,7 @@ "use strict"; | ||
if (!next) { | ||
var spottables = getSpottableDescendants(containerId); // if there isn't a preferred entry on an overflow container, try to find the first element | ||
// in view | ||
var spottables = getSpottableDescendants(containerId); // if there isn't a preferred entry on an overflow container, filter the visible elements | ||
if (overflow) { | ||
var containerRect = (0, _utils.getContainerRect)(containerId); | ||
next = spottables.find(function (element) { | ||
next = spottables.filter(function (element) { | ||
return (0, _utils.contains)(containerRect, (0, _utils.getRect)(element)); | ||
@@ -818,0 +817,0 @@ }); |
269867
5429
Updated@enact/core@^2.2.8