@@ -6332,13 +6332,17 @@ var control = (function() {
63326332 } ;
63336333
63346334 render . dependents = function ( ) {
6335+ var type = {
6336+ control : [ "input" , "button" , "textarea" ] ,
6337+ element : [ "label" , "p" , "div" ]
6338+ } ;
63356339 var disable = {
6336- input : function ( input , state ) {
6337- if ( input ) {
6340+ control : function ( control , state ) {
6341+ if ( control ) {
63386342 if ( state ) {
6339- input . disabled = false ;
6343+ control . disabled = false ;
63406344 } else {
6341- input . disabled = true ;
6345+ control . disabled = true ;
63426346 } ;
63436347 } ;
63446348 } ,
@@ -7028,9 +7032,10 @@ var control = (function() {
70287032 arrayItem . dependents ( ) . forEach ( function ( arrayItem , index ) {
70297033 var element = helper . eA ( arrayItem ) ;
70307034 element . forEach ( function ( arrayItem , index ) {
7031- if ( arrayItem . tagName . toLowerCase ( ) == "input" ) {
7032- disable . input ( arrayItem , condition ) ;
7033- } else {
7035+ var elementType = arrayItem . tagName . toLowerCase ( ) ;
7036+ if ( type . control . includes ( elementType ) ) {
7037+ disable . control ( arrayItem , condition ) ;
7038+ } else if ( type . element . includes ( elementType ) ) {
70347039 disable . element ( arrayItem , condition ) ;
70357040 } ;
70367041 } ) ;
0 commit comments