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

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

Closed
wants to merge 1 commit into from

Conversation

frequent
Copy link
Contributor

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.

@gabrielschulhof
Copy link

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.

@arschmitz
Copy link
Contributor

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

@frequent
Copy link
Contributor Author

frequent commented Jun 2, 2014

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

@arschmitz
Copy link
Contributor

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 subscribe to this conversation on GitHub. Already have an account? Sign in.