Permalink
Browse files

Fixes #3020 — Theme-dependent backgrounds should be applied only to ‘…

…data-role=content’ within a dialog.
  • Loading branch information...
1 parent 2212d74 commit 5262c2be56cee855ee008ba8c2816f36d9fa0342 @Wilto Wilto committed Nov 11, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 js/jquery.mobile.page.sections.js
View
3 js/jquery.mobile.page.sections.js
@@ -15,6 +15,7 @@ $( ":jqmData(role='page'), :jqmData(role='dialog')" ).live( "pagecreate", functi
var $page = $( this ),
o = $page.data( "page" ).options,
+ pageRole = $page.jqmData( "role" ),
pageTheme = o.theme;
$( ":jqmData(role='header'), :jqmData(role='footer'), :jqmData(role='content')", this ).each(function() {
@@ -73,7 +74,7 @@ $( ":jqmData(role='page'), :jqmData(role='dialog')" ).live( "pagecreate", functi
});
} else if ( role === "content" ) {
- if ( contentTheme ) {
+ if ( contentTheme && pageRole === "dialog" ) {
$this.addClass( "ui-body-" + ( contentTheme ) );
}

0 comments on commit 5262c2b

Please sign in to comment.