@schukai/monster 3.56.1 → 3.57.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -377,7 +377,7 @@ function findClosestByAttribute(element, key, value) {
377
377
  }
378
378
 
379
379
  /**
380
- * This function searches, starting from an `HTMLElemement`, for the next element that has a certain attribute.
380
+ * This function searches, starting from an `HTMLElement`, for the next element that has a certain attribute.
381
381
  *
382
382
  * ```html
383
383
  * <div class="myclass" id="2">
@@ -320,9 +320,13 @@ class CustomControl extends CustomElement {
320
320
  */
321
321
  formDisabledCallback(disabled) {
322
322
  if (disabled) {
323
- this.setAttribute("disabled", "");
323
+ if (!this.hasAttribute("disabled")) {
324
+ this.setAttribute("disabled", "");
325
+ }
324
326
  } else {
325
- this.removeAttribute("disabled");
327
+ if (this.hasAttribute("disabled")) {
328
+ this.removeAttribute("disabled");
329
+ }
326
330
  }
327
331
  }
328
332