File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -74,9 +74,11 @@ class Pattern extends BasePattern {
7474 }
7575
7676 enable ( ) {
77- if ( dom . is_input ( this . el ) ) {
78- this . el . disabled = false ;
79- } else if ( this . el . tagName === "A" ) {
77+ const inputs = dom . find_inputs ( this . el ) ;
78+ for ( const input of inputs ) {
79+ input . disabled = false ;
80+ }
81+ if ( this . el . tagName === "A" ) {
8082 events . remove_event_listener ( this . el , "pat-depends--click" ) ;
8183 }
8284 this . el . classList . remove ( "disabled" ) ;
@@ -89,9 +91,11 @@ class Pattern extends BasePattern {
8991 }
9092
9193 disable ( ) {
92- if ( dom . is_input ( this . el ) ) {
93- this . el . disabled = true ;
94- } else if ( this . el . tagName === "A" ) {
94+ const inputs = dom . find_inputs ( this . el ) ;
95+ for ( const input of inputs ) {
96+ input . disabled = true ;
97+ }
98+ if ( this . el . tagName === "A" ) {
9599 events . add_event_listener ( this . el , "click" , "pat-depends--click" , ( e ) =>
96100 e . preventDefault ( )
97101 ) ;
You can’t perform that action at this time.
0 commit comments