@gustavo-valsechi/client 1.4.97 → 1.4.99
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,20 +100,19 @@ 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.addEventListener);
|
|
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
|
-
const
|
|
110
|
-
|
|
107
|
+
const styles = window.getComputedStyle(targetElement);
|
|
108
|
+
console.log(styles);
|
|
109
|
+
if (styles.opacity === "1") {
|
|
111
110
|
close(targetElement);
|
|
112
111
|
return;
|
|
113
112
|
}
|
|
114
113
|
const coords = getCoords(element);
|
|
115
114
|
open(targetElement, coords);
|
|
116
|
-
|
|
115
|
+
elementFocusable(target, index).focus();
|
|
117
116
|
});
|
|
118
117
|
element.addEventListener("resize", () => {
|
|
119
118
|
import_lodash.default.forEach(containerRef.current, (elementRef) => close(elementRef));
|
|
@@ -66,20 +66,19 @@ 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.addEventListener);
|
|
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
|
-
const
|
|
76
|
-
|
|
73
|
+
const styles = window.getComputedStyle(targetElement);
|
|
74
|
+
console.log(styles);
|
|
75
|
+
if (styles.opacity === "1") {
|
|
77
76
|
close(targetElement);
|
|
78
77
|
return;
|
|
79
78
|
}
|
|
80
79
|
const coords = getCoords(element);
|
|
81
80
|
open(targetElement, coords);
|
|
82
|
-
|
|
81
|
+
elementFocusable(target, index).focus();
|
|
83
82
|
});
|
|
84
83
|
element.addEventListener("resize", () => {
|
|
85
84
|
_.forEach(containerRef.current, (elementRef) => close(elementRef));
|