File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- export { VALUE , BaseElement } ;
1+ export { DISABLED , VALUE , BaseElement } ;
22const
33DISABLED = "disabled" , // DOM attributes
44TAB_INDEX = "tabindex" ,
@@ -79,7 +79,7 @@ class BaseElement extends HTMLElement {
7979 }
8080// getters/setters reflect the HTML attributes, see attributeChangedCallback()
8181 get disabled ( ) { return this . hasAttribute ( DISABLED ) ; }
82- set disabled ( val ) { this . _setBool ( DISABLED , val ) ; }
82+ set disabled ( val ) { this . toggleAttribute ( DISABLED , val ) ; }
8383
8484// define wraps customElements.define for consistency of class and tag names
8585 static define ( cls ) {
Original file line number Diff line number Diff line change 11export { InputNum } ;
22
3- import { VALUE , BaseElement } from "./base-element.js" ;
3+ import { DISABLED , VALUE , BaseElement } from "./base-element.js" ;
44const
55MAX = "max" , // DOM attributes:
66MIN = "min" ,
@@ -256,6 +256,9 @@ static observedAttributes = [
256256 case NOTATION : // convert null to undefined
257257 this . #locale[ name ] = val ?? undefined ;
258258 break ;
259+ case DISABLED : // falls through
260+ for ( const elm of this . #btns)
261+ elm . style . pointerEvents = val ? "none" : "" ;
259262 default : // handled by BaseElement
260263 super . attributeChangedCallback ( name , _ , val ) ;
261264 return ;
You can’t perform that action at this time.
0 commit comments