@rogieking/figui3 2.0.0 → 2.0.1
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 +8 -1
- package/package.json +1 -1
package/fig.js
CHANGED
|
@@ -2338,7 +2338,14 @@ class FigCheckbox extends HTMLElement {
|
|
|
2338
2338
|
if (!this.labelElement) {
|
|
2339
2339
|
this.labelElement = document.createElement("label");
|
|
2340
2340
|
this.labelElement.setAttribute("for", this.input.id);
|
|
2341
|
-
|
|
2341
|
+
}
|
|
2342
|
+
// Add to DOM if not already there and input is in the DOM
|
|
2343
|
+
if (
|
|
2344
|
+
this.labelElement &&
|
|
2345
|
+
!this.labelElement.parentNode &&
|
|
2346
|
+
this.input.parentNode
|
|
2347
|
+
) {
|
|
2348
|
+
this.input.after(this.labelElement);
|
|
2342
2349
|
}
|
|
2343
2350
|
}
|
|
2344
2351
|
|