@rogieking/figui3 1.0.12 → 1.0.14

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 (3) hide show
  1. package/fig.css +1 -0
  2. package/fig.js +7 -7
  3. package/package.json +1 -1
package/fig.css CHANGED
@@ -1184,6 +1184,7 @@ fig-slider {
1184
1184
 
1185
1185
  display: inline-flex;
1186
1186
  align-items: center;
1187
+ position: relative;
1187
1188
 
1188
1189
  .fig-slider-input-container {
1189
1190
  height: var(--slider-height);
package/fig.js CHANGED
@@ -678,18 +678,18 @@ class FigField extends HTMLElement {
678
678
  super()
679
679
  }
680
680
  connectedCallback() {
681
- this.label = this.querySelector('label')
682
- this.input = Array.from(this.childNodes).find(node => node.nodeName.toLowerCase().startsWith("fig-"))
683
- console.log('input:', this.input)
684
- if (this.input) {
685
- this.label.addEventListener('click', this.focus.bind(this))
686
- }
681
+ requestAnimationFrame(() => {
682
+ this.label = this.querySelector('label')
683
+ this.input = Array.from(this.childNodes).find(node => node.nodeName.toLowerCase().startsWith("fig-"))
684
+ if (this.input) {
685
+ this.label.addEventListener('click', this.focus.bind(this))
686
+ }
687
+ })
687
688
  }
688
689
  focus() {
689
690
  if (!this.input) {
690
691
  this.input = Array.from(this.childNodes).find(node => node.nodeName.toLowerCase().startsWith("fig-"))
691
692
  }
692
- console.log('input:', this.input)
693
693
  this.input.focus()
694
694
  }
695
695
  }
package/package.json CHANGED
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@rogieking/figui3",
3
- "version": "1.0.12"
3
+ "version": "1.0.14"
4
4
  }