Permalink
Browse files

Fixes #2659 - buttons don't inherit page-theme

- Insert the fake button container before calling buttonMarkup(). This allows the buttonMarkup() code to accurately calculate theme inheritance.
  • Loading branch information...
jblas committed Oct 14, 2011
1 parent ab8dead commit 2c2be3d9c6dd82861dce91f489fb586c66877af8
Showing with 1 addition and 1 deletion.
  1. +1 −1 js/jquery.mobile.forms.button.js
@@ -28,6 +28,7 @@ $.widget( "mobile.button", $.mobile.widget, {
// Add ARIA role
this.button = $( "<div></div>" )
.text( $el.text() || $el.val() )
+ .insertBefore( $el )
.buttonMarkup({
theme: o.theme,
icon: o.icon,
@@ -37,7 +38,6 @@ $.widget( "mobile.button", $.mobile.widget, {
shadow: o.shadow,
iconshadow: o.iconshadow
})
- .insertBefore( $el )
.append( $el.addClass( "ui-btn-hidden" ) );
type = $el.attr( "type" );

0 comments on commit 2c2be3d

Please sign in to comment.