New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't close long list select menu #8054

Closed
vietnnit opened this Issue Apr 2, 2015 · 4 comments

Comments

Projects
None yet
2 participants
@vietnnit

vietnnit commented Apr 2, 2015

I had used select menu(http://demos.jquerymobile.com/1.4.5/selectmenu-custom-filter/)
When I click close button (long list) the menu can't close.
Please help me!

@gabrielschulhof

This comment has been minimized.

Show comment
Hide comment
@gabrielschulhof

gabrielschulhof Apr 2, 2015

Contributor

@vietnnit Please provide a test page illustrating the problem!

You can start with http://jsbin.com/huvoraba/1

Contributor

gabrielschulhof commented Apr 2, 2015

@vietnnit Please provide a test page illustrating the problem!

You can start with http://jsbin.com/huvoraba/1

@gabrielschulhof

This comment has been minimized.

Show comment
Hide comment
@gabrielschulhof

gabrielschulhof Apr 2, 2015

Contributor

OK. NM. Reproduced with the demo.

Contributor

gabrielschulhof commented Apr 2, 2015

OK. NM. Reproduced with the demo.

@gabrielschulhof

This comment has been minimized.

Show comment
Hide comment
@gabrielschulhof

gabrielschulhof Apr 2, 2015

Contributor

@vietnnit here's what you need to change in the sample code to make it work:

    // After the dialog is closed, the form containing the filter input is returned to the popup.
    .on( "pagecontainerhide", function( event, data ) {
        var listview, form;

        // We only handle the disappearance of a dialog generated by a filterable selectmenu
        if ( !pageIsSelectmenuDialog( data.toPage ) ) {
            return;                   /*   ^^^^^^ */
        }                             /*   *** change this to prevPage *** */

        listview = data.prevPage.jqmData( "listview" ),
        form = listview.jqmData( "filter-form" );

        // Put the form back in the popup. It goes ahead of the listview.
        listview.before( form );
    });```
Contributor

gabrielschulhof commented Apr 2, 2015

@vietnnit here's what you need to change in the sample code to make it work:

    // After the dialog is closed, the form containing the filter input is returned to the popup.
    .on( "pagecontainerhide", function( event, data ) {
        var listview, form;

        // We only handle the disappearance of a dialog generated by a filterable selectmenu
        if ( !pageIsSelectmenuDialog( data.toPage ) ) {
            return;                   /*   ^^^^^^ */
        }                             /*   *** change this to prevPage *** */

        listview = data.prevPage.jqmData( "listview" ),
        form = listview.jqmData( "filter-form" );

        // Put the form back in the popup. It goes ahead of the listview.
        listview.before( form );
    });```
@vietnnit

This comment has been minimized.

Show comment
Hide comment
@vietnnit

vietnnit Apr 7, 2015

gabrielschulhof
Thanks! :)

vietnnit commented Apr 7, 2015

gabrielschulhof
Thanks! :)

kakul added a commit to kakul/jquery-mobile that referenced this issue Apr 14, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment