Permalink
Browse files

Prevent inputs with unnecessary data-role button from being double en…

…hanced: bug #3141
  • Loading branch information...
1 parent 138547c commit 79d20779f830be3d44a5f5ae382ca41cb69d20bf Josh Dean committed Dec 26, 2011
Showing with 3 additions and 0 deletions.
  1. +3 −0 js/jquery.mobile.buttonMarkup.js
@@ -29,6 +29,9 @@ $.fn.buttonMarkup = function( options ) {
buttonText = document.createElement( o.wrapperEls ),
buttonIcon = o.icon ? document.createElement( "span" ) : null;
+ // if so, prevent double enhancement, and continue with rest of the elements.
+ if( e.tagName === 'INPUT' && e.getAttribute('data-role') === 'button') continue;
+
if ( attachEvents ) {
attachEvents();
}

0 comments on commit 79d2077

Please sign in to comment.