@rogieking/figui3 1.0.3 → 1.0.4

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.
Files changed (2) hide show
  1. package/fig.js +5 -1
  2. package/package.json +1 -1
package/fig.js CHANGED
@@ -109,7 +109,7 @@ class FigTooltip extends HTMLElement {
109
109
  this.popup = document.createElement('span');
110
110
  this.popup.setAttribute("class", "fig-tooltip")
111
111
  this.popup.style.position = "fixed"
112
- this.popup.style.display = "none"
112
+ this.popup.style.visibility = "hidden"
113
113
  this.popup.style.pointerEvents = "none"
114
114
  this.popup.innerText = this.getAttribute("text")
115
115
  document.body.append(this.popup)
@@ -177,6 +177,7 @@ class FigTooltip extends HTMLElement {
177
177
  this.popup.style.top = `${top}px`;
178
178
  this.popup.style.left = `${left}px`;
179
179
  this.popup.style.opacity = "1";
180
+ this.popup.style.visibility = "visible"
180
181
  this.popup.style.display = "block"
181
182
  this.popup.style.pointerEvents = "all"
182
183
  this.popup.style.zIndex = parseInt((new Date()).getTime() / 1000)
@@ -655,6 +656,9 @@ class FigField extends HTMLElement {
655
656
  }
656
657
  }
657
658
  focus() {
659
+ if (!this.input) {
660
+ this.input = Array.from(this.childNodes).find(node => node.nodeName.toLowerCase().startsWith("fig-"))
661
+ }
658
662
  console.log('input:', this.input)
659
663
  this.input.focus()
660
664
  }
package/package.json CHANGED
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@rogieking/figui3",
3
- "version": "1.0.3"
3
+ "version": "1.0.4"
4
4
  }