@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 focusable = elementFocusable(target, index);
108
- console.log(focusable);
109
- console.log(document.activeElement);
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
- focusable.focus();
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 focusable = elementFocusable(target, index);
74
- console.log(focusable);
75
- console.log(document.activeElement);
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
- focusable.focus();
81
+ elementFocusable(target, index).focus();
83
82
  });
84
83
  element.addEventListener("resize", () => {
85
84
  _.forEach(containerRef.current, (elementRef) => close(elementRef));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gustavo-valsechi/client",
3
- "version": "1.4.98",
3
+ "version": "1.4.99",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",