@gustavo-valsechi/client 1.4.96 → 1.4.98
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.
|
@@ -100,14 +100,14 @@ const TargetProviderContainer = ({ children }) => {
|
|
|
100
100
|
import_lodash.default.forEach(targets, (target, index) => {
|
|
101
101
|
var _a;
|
|
102
102
|
const element = (_a = target.ref) == null ? void 0 : _a.current;
|
|
103
|
-
console.log(target);
|
|
104
|
-
console.log(element);
|
|
105
103
|
if (!(element == null ? void 0 : element.addEventListener)) return;
|
|
106
104
|
element.addEventListener("click", () => {
|
|
107
105
|
const targetElement = import_lodash.default.find(containerRef.current, (data, i) => i === index);
|
|
108
106
|
if (!targetElement) return;
|
|
109
107
|
const focusable = elementFocusable(target, index);
|
|
110
|
-
|
|
108
|
+
console.log(focusable);
|
|
109
|
+
console.log(document.activeElement);
|
|
110
|
+
if (focusable !== document.activeElement) {
|
|
111
111
|
close(targetElement);
|
|
112
112
|
return;
|
|
113
113
|
}
|
|
@@ -66,14 +66,14 @@ const TargetProviderContainer = ({ children }) => {
|
|
|
66
66
|
_.forEach(targets, (target, index) => {
|
|
67
67
|
var _a;
|
|
68
68
|
const element = (_a = target.ref) == null ? void 0 : _a.current;
|
|
69
|
-
console.log(target);
|
|
70
|
-
console.log(element);
|
|
71
69
|
if (!(element == null ? void 0 : element.addEventListener)) return;
|
|
72
70
|
element.addEventListener("click", () => {
|
|
73
71
|
const targetElement = _.find(containerRef.current, (data, i) => i === index);
|
|
74
72
|
if (!targetElement) return;
|
|
75
73
|
const focusable = elementFocusable(target, index);
|
|
76
|
-
|
|
74
|
+
console.log(focusable);
|
|
75
|
+
console.log(document.activeElement);
|
|
76
|
+
if (focusable !== document.activeElement) {
|
|
77
77
|
close(targetElement);
|
|
78
78
|
return;
|
|
79
79
|
}
|