File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change 66
77$ . fn . buttonMarkup = function ( options ) {
88 options = options || { } ;
9-
109 for ( var i = 0 ; i < this . length ; i ++ ) {
1110 var el = this . eq ( i ) ,
1211 e = el [ 0 ] ,
@@ -92,7 +91,7 @@ $.fn.buttonMarkup = function( options ) {
9291 }
9392
9493 e . appendChild ( buttonInner ) ;
95-
94+
9695 // TODO obviously it would be nice to pull this element out instead of
9796 // retrieving it from the DOM again, but this change is much less obtrusive
9897 // and 1.0 draws nigh
@@ -118,12 +117,11 @@ function closestEnabledButton( element ) {
118117 // handed could be in an SVG DOM where className on SVG elements is defined to
119118 // be of a different type (SVGAnimatedString). We only operate on HTML DOM
120119 // elements, so we look for plain "string".
121-
122- cname = ( typeof element . className === 'string' ) && element . className . split ( ' ' ) ;
123-
124- if ( cname && $ . inArray ( "ui-btn" , cname ) > - 1 && $ . inArray ( "ui-disabled" , cname ) < 0 ) {
120+ cname = ( typeof element . className === 'string' ) && ( element . className + ' ' ) ;
121+ if ( cname && cname . indexOf ( "ui-btn " ) > - 1 && cname . indexOf ( "ui-disabled " ) < 0 ) {
125122 break ;
126123 }
124+
127125 element = element . parentNode ;
128126 }
129127
You can’t perform that action at this time.
0 commit comments