Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions js/jquery.mobile.buttonMarkup.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

$.fn.buttonMarkup = function( options ) {
options = options || {};

for ( var i = 0; i < this.length; i++ ) {
var el = this.eq( i ),
e = el[ 0 ],
Expand Down Expand Up @@ -92,7 +91,7 @@ $.fn.buttonMarkup = function( options ) {
}

e.appendChild( buttonInner );

// TODO obviously it would be nice to pull this element out instead of
// retrieving it from the DOM again, but this change is much less obtrusive
// and 1.0 draws nigh
Expand All @@ -118,12 +117,11 @@ function closestEnabledButton( element ) {
// handed could be in an SVG DOM where className on SVG elements is defined to
// be of a different type (SVGAnimatedString). We only operate on HTML DOM
// elements, so we look for plain "string".

cname = ( typeof element.className === 'string' ) && element.className.split(' ');

if ( cname && $.inArray( "ui-btn", cname ) > -1 && $.inArray( "ui-disabled", cname ) < 0 ) {
cname = ( typeof element.className === 'string' ) && (element.className + ' ');
if ( cname && cname.indexOf("ui-btn ") > -1 && cname.indexOf("ui-disabled ") < 0 ) {
break;
}

element = element.parentNode;
}

Expand Down