fix #6656 pageContainer: dynamic injected pages missing remove bindings #6657

wants to merge 1 commit into


None yet

4 participants


Fixes #6656

This will allow JQM to remove dynamically injected pages from the DOM.

When dynamically injecting a page, inside pageContainer widget, the page to transition to is injected into the DOM, thus JQM will not fire an ajax request to fetch it. This will prevent _loadSuccess() from being called, which prevents _include() from being called, which sets the remove binding on the page being loaded.

Same as inside _include() the new page is enhanced first and then bound to.


After realizing that we have page option domCache, and that bindRemove() takes that into account, meaning that it does not perform any binding if domCache is turned on for the page, I am starting to think that perhaps this PR is acceptable.

My only concern is that making this change may result in bindRemove() being called multiple times on the same page. We should, maybe, add a flag to the page indicating that bindRemove() has already been called on it to make sure we don't attach pagehide.remove more than once for the same page.

@gabrielschulhof gabrielschulhof modified the milestone: 1.4.3, 1.4.1 Mar 1, 2014
@jaspermdegroot jaspermdegroot modified the milestone: 1.5.0, 1.4.3 Jun 2, 2014

@frequent wont this change cause internal page in a multi page document to also be removed?

frequent commented Jun 2, 2014

@arschmitz : hm. some time ago. Need to delve into the code again.


This is pretty stale at this point so im going to close it. @frequent if you still would like to see this change lets talk on irc or move back to the issue about the best way to make this happen.

@arschmitz arschmitz closed this Dec 21, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment