@react-aria/interactions 3.0.0-nightly.2769 → 3.0.0-nightly.2779
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/dist/import.mjs +3 -1
- package/dist/main.js +3 -1
- package/dist/main.js.map +1 -1
- package/dist/module.js +3 -1
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/useFocus.ts +5 -1
package/dist/import.mjs
CHANGED
|
@@ -741,6 +741,7 @@ function $f1ab8c75478c6f73$export$cf75428e0b9ed1ea({ children: children }) {
|
|
|
741
741
|
// NOTICE file in the root directory of this source tree.
|
|
742
742
|
// See https://github.com/facebook/react/tree/cc7c1aece46a6b69b41958d731e0fd27c94bfc6c/packages/react-interactions
|
|
743
743
|
|
|
744
|
+
|
|
744
745
|
/*
|
|
745
746
|
* Copyright 2020 Adobe. All rights reserved.
|
|
746
747
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -867,7 +868,8 @@ function $a1ea59d68270f0dd$export$f8168d8dd8fd66e6(props) {
|
|
|
867
868
|
const onFocus = (0, $bx7SL$useCallback)((e)=>{
|
|
868
869
|
// Double check that document.activeElement actually matches e.target in case a previously chained
|
|
869
870
|
// focus handler already moved focus somewhere else.
|
|
870
|
-
|
|
871
|
+
const ownerDocument = (0, $bx7SL$getOwnerDocument)(e.target);
|
|
872
|
+
if (e.target === e.currentTarget && ownerDocument.activeElement === e.target) {
|
|
871
873
|
if (onFocusProp) onFocusProp(e);
|
|
872
874
|
if (onFocusChange) onFocusChange(true);
|
|
873
875
|
onSyntheticFocus(e);
|
package/dist/main.js
CHANGED
|
@@ -769,6 +769,7 @@ function $3596bae48579386f$export$cf75428e0b9ed1ea({ children: children }) {
|
|
|
769
769
|
// NOTICE file in the root directory of this source tree.
|
|
770
770
|
// See https://github.com/facebook/react/tree/cc7c1aece46a6b69b41958d731e0fd27c94bfc6c/packages/react-interactions
|
|
771
771
|
|
|
772
|
+
|
|
772
773
|
/*
|
|
773
774
|
* Copyright 2020 Adobe. All rights reserved.
|
|
774
775
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -895,7 +896,8 @@ function $5cb73d0ce355b0dc$export$f8168d8dd8fd66e6(props) {
|
|
|
895
896
|
const onFocus = (0, $goTMa$react.useCallback)((e)=>{
|
|
896
897
|
// Double check that document.activeElement actually matches e.target in case a previously chained
|
|
897
898
|
// focus handler already moved focus somewhere else.
|
|
898
|
-
|
|
899
|
+
const ownerDocument = (0, $goTMa$reactariautils.getOwnerDocument)(e.target);
|
|
900
|
+
if (e.target === e.currentTarget && ownerDocument.activeElement === e.target) {
|
|
899
901
|
if (onFocusProp) onFocusProp(e);
|
|
900
902
|
if (onFocusChange) onFocusChange(true);
|
|
901
903
|
onSyntheticFocus(e);
|