itsa-react-focuscontainer 16.0.7 → 16.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/focusmanager.js +3 -5
- package/package.json +2 -2
package/lib/focusmanager.js
CHANGED
|
@@ -355,12 +355,10 @@ const defaultFnSetFocus = function(e) {
|
|
|
355
355
|
// we need to go async, otherwise the `focus`-event won't trigger a resync,
|
|
356
356
|
// because `state.noResync` would still be `true`.
|
|
357
357
|
async(() => {
|
|
358
|
-
if ((node===document.activeElement) || props.scrollIntoView) {
|
|
359
|
-
node.itsa_scrollIntoView
|
|
360
|
-
}
|
|
361
|
-
else {
|
|
362
|
-
node.focus();
|
|
358
|
+
if (node.itsa_scrollIntoView && ((node===document.activeElement) || props.scrollIntoView)) {
|
|
359
|
+
node.itsa_scrollIntoView(null, null, transitionTime, marginTop, marginLeft);
|
|
363
360
|
}
|
|
361
|
+
node.focus();
|
|
364
362
|
resolve(true);
|
|
365
363
|
});
|
|
366
364
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "itsa-react-focuscontainer",
|
|
3
|
-
"version": "16.0.
|
|
3
|
+
"version": "16.0.9",
|
|
4
4
|
"description": "React component: focussable container that managed the focus",
|
|
5
5
|
"author": [
|
|
6
6
|
{
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"itsa-dom": "^1.2.2",
|
|
38
|
-
"itsa-event": "^1.1.
|
|
38
|
+
"itsa-event": "^1.1.12",
|
|
39
39
|
"itsa-jsext": "^2.0.2",
|
|
40
40
|
"itsa-utils": "^1.4.1",
|
|
41
41
|
"prop-types": "^15.5.10"
|