@rogieking/figui3 1.0.13 → 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.
- package/fig.js +7 -7
- package/package.json +1 -1
package/fig.js
CHANGED
|
@@ -678,18 +678,18 @@ class FigField extends HTMLElement {
|
|
|
678
678
|
super()
|
|
679
679
|
}
|
|
680
680
|
connectedCallback() {
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
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