Skip to content

Commit 5262c2b

Browse files
committed
Fixes jquery-archive#3020 — Theme-dependent backgrounds should be applied only to ‘data-role=content’ within a dialog.
1 parent 2212d74 commit 5262c2b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

js/jquery.mobile.page.sections.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ $( ":jqmData(role='page'), :jqmData(role='dialog')" ).live( "pagecreate", functi
1515

1616
var $page = $( this ),
1717
o = $page.data( "page" ).options,
18+
pageRole = $page.jqmData( "role" ),
1819
pageTheme = o.theme;
1920

2021
$( ":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
7374
});
7475

7576
} else if ( role === "content" ) {
76-
if ( contentTheme ) {
77+
if ( contentTheme && pageRole === "dialog" ) {
7778
$this.addClass( "ui-body-" + ( contentTheme ) );
7879
}
7980

0 commit comments

Comments
 (0)