Skip to content

Commit a07762d

Browse files
committed
buttonMarkup Fix for IE8
Apparently IE8 does not allow nested DOM objects within a <INPUT>.
1 parent dd7a89c commit a07762d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

js/jquery.mobile.buttonMarkup.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,11 @@ $.fn.buttonMarkup = function( options ) {
9090
buttonText.appendChild( e.firstChild );
9191
}
9292

93-
e.appendChild( buttonInner );
93+
// XXX It seems like IE8 doesn't allow placing DOM elements within
94+
// inputs; which may not be a bad thing.
95+
if (!( el.length == 1 && el[0].tagName == 'INPUT' )) {
96+
e.appendChild( buttonInner );
97+
}
9498

9599
// TODO obviously it would be nice to pull this element out instead of
96100
// retrieving it from the DOM again, but this change is much less obtrusive

0 commit comments

Comments
 (0)