I am migrating from JQuery mobile 1.3 to 1.4.2
We dynamically generate a panel as a menu on pagebeforeshow and open the panel automatically on a wide display to have less render time on pageshow. In 1.3.x this worked fine and the various examples around the internet work.
If the page is displayed directly then the panel is displayed correctly.
However if you navigate from one page to another you can see the menu for a second then it vanishes.
Tracking the issue back, this seems to be the culprit.
Line #13041
// Clean up open panels after page hide
if ( self._parentPage ) {
this.document.on( "pagehide", ":jqmData(role='page')", function() {
if (self._open) {
self.close( true );
}
});
The pagehide event appears to be generated from the last page, however the new panel is on the current page and therefore should not be closed.
I can take a stab and say that my new panel is being bound to the entire document on pagehide event, therefore is being closed based on the last page hiding.
Not sure what it should be bound to, but I'm guessing it should be its parent page (although I suspect there may be issues with external panels with that)
Because I want the panel to always be open in my wide display, is there some work around where I can either set _open in the panel to false, or clear the close event for my panel to null?
Thanks
Chris