Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Page: Fixed the abnormal operating of _setOptions() for the domCache option. #6706

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions js/widgets/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,17 @@ $.widget( "mobile.page", {
this.element.find( "[data-" + $.mobile.ns + "='content']" ).removeClass( "ui-body-" + this.options.contentTheme )
.addClass( "ui-body-" + o.contentTheme );
}

if ( o.domCache !== undefined && this.options.domCache !== o.domCache ) {
this.options.domCache = o.domCache;
this.element.attr( "data-dom-cache", o.domCache );

if ( o.domCache ) {
this.element.unbind( "pagehide.remove" );
} else {
this.element.page( "bindRemove" );
}
}
},

_handlePageBeforeShow: function(/* e */) {
Expand Down