@noriginmedia/react-spatial-navigation
Advanced tools
Comparing version 2.9.1 to 2.9.2
@@ -7,2 +7,6 @@ # Changelog | ||
## [2.9.2] | ||
### Fixed | ||
- Fixed issue #46 Focus jumps on wrong component: Removed `setTimeout` in `measureLayout` to avoid coordinates mismatches with DOM nodes. | ||
## [2.9.1] | ||
@@ -9,0 +13,0 @@ ### Added |
@@ -35,16 +35,14 @@ "use strict"; | ||
if (node && relativeNode) { | ||
setTimeout(function () { | ||
var relativeRect = getRect(relativeNode); | ||
var relativeRect = getRect(relativeNode); | ||
var _getRect = getRect(node), | ||
height = _getRect.height, | ||
left = _getRect.left, | ||
top = _getRect.top, | ||
width = _getRect.width; | ||
var _getRect = getRect(node), | ||
height = _getRect.height, | ||
left = _getRect.left, | ||
top = _getRect.top, | ||
width = _getRect.width; | ||
var x = left - relativeRect.left; | ||
var y = top - relativeRect.top; | ||
var x = left - relativeRect.left; | ||
var y = top - relativeRect.top; | ||
callback(x, y, width, height, left, top); | ||
}, 0); | ||
callback(x, y, width, height, left, top); | ||
} | ||
@@ -51,0 +49,0 @@ }; |
@@ -630,6 +630,6 @@ 'use strict'; | ||
this.log('smartNavigate', 'currentCutoffCoordinate', currentCutoffCoordinate); | ||
this.log('smartNavigate', 'siblings', siblings.length + ' elements:', siblings.map(function (s) { | ||
return s.focusKey; | ||
}).join(', '), siblings.map(function (s) { | ||
return s.node; | ||
this.log('smartNavigate', 'siblings', siblings.length + ' elements:', siblings.map(function (sibling) { | ||
return sibling.focusKey; | ||
}).join(', '), siblings.map(function (sibling) { | ||
return sibling.node; | ||
})); | ||
@@ -636,0 +636,0 @@ } |
{ | ||
"name": "@noriginmedia/react-spatial-navigation", | ||
"version": "2.9.1", | ||
"version": "2.9.2", | ||
"description": "HOC-based Spatial Navigation (key navigation) solution for React", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
97986
1794
17