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

Fixes #4185 - When leaving from a page contains nested listview, pageremove event does not fire #4285

Merged
merged 1 commit into from May 16, 2012

Conversation

jaspermdegroot
Copy link
Contributor

Issue: If a page contains a listview with a nested list the pageremove event does not fire when you leave the page, although the page and its subpages do get removed from the DOM.
Solved by adjusting the 'specialized' page remove function.

Fixes #4185

Passed the unit test. Live test page: http://ugomobi.github.com/pageremove/

Note: When you leave a nested/subpage no pages are removed from the DOM. See my comments on issue 4185.

@scottjehl
Copy link

Looks good to me, aside from one thing that maybe @johnbender would have input on...

For triggering other widget (or page in this case) events, we usually do something like the following:

mypage.data( "page" )._trigger( "remove" );

...which through the widget factory would prefix the widget name to trigger a pageremove event. Any reason why we're using new $.event(... here (and in navigation.js) instead of just triggering the event as above?

@johnbender
Copy link
Contributor

@scottjehl @uGoMobi

Scott is correct. That's the standard withing the library when triggering a widget specific event. We make use of the Widget Factory machinery.

scottjehl pushed a commit that referenced this pull request May 16, 2012
Fixes #4185 - When leaving from a page contains nested listview, pageremove event does not fire
@scottjehl scottjehl merged commit 5d358d5 into jquery-archive:master May 16, 2012
scottjehl pushed a commit that referenced this pull request May 24, 2012
Fixes #4185 - When leaving from a page contains nested listview, pageremove event does not fire
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When leaving from a page contains nested listview, pageremove event does not fire.
3 participants