@gustavo-valsechi/client 1.4.98 → 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.
|
@@ -104,16 +104,15 @@ const TargetProviderContainer = ({ children }) => {
|
|
|
104
104
|
element.addEventListener("click", () => {
|
|
105
105
|
const targetElement = import_lodash.default.find(containerRef.current, (data, i) => i === index);
|
|
106
106
|
if (!targetElement) return;
|
|
107
|
-
const
|
|
108
|
-
console.log(
|
|
109
|
-
|
|
110
|
-
if (focusable !== document.activeElement) {
|
|
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));
|
|
@@ -70,16 +70,15 @@ const TargetProviderContainer = ({ children }) => {
|
|
|
70
70
|
element.addEventListener("click", () => {
|
|
71
71
|
const targetElement = _.find(containerRef.current, (data, i) => i === index);
|
|
72
72
|
if (!targetElement) return;
|
|
73
|
-
const
|
|
74
|
-
console.log(
|
|
75
|
-
|
|
76
|
-
if (focusable !== document.activeElement) {
|
|
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));
|