Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Can't open popup from select menu. #5254

kevinbhayes opened this Issue · 6 comments

4 participants


JQM will ignore popup open requests when called from a function bound to a select menu change event.
$("#message-commands").bind("change",function(event,ui) {
var value =;
case "delete":
does not work. If I put the popup open command in a timeout function, it will work if it is sufficiently long, but the time varies between client devices. There's no way to tell how long to wait for all clients, and I don't want to make it too long the user thinks nothing happens.

If this behaviour isn't supported, then select menus need a "closed" event to bind the command to.



I suppose this is about a custom select menu. Those are displayed as a popup and chaining popups is not allowed (see last paragraph here
The popup fires popupafterclose event so that should resolve your problem.
I am closing this as not a bug. If you still think there is an issue we have to look into, please provide a test page.


Here is the test page. Select "delete using popupafterclose" from the Actions popup to test using the popupafterclose bound event.


It is better to a working example on jsFiddle or JS Bin.

Anyways, confirmed.


So should the status be changed back to open then? Thanks.

FYI, I put the example here:

@jaspermdegroot jaspermdegroot reopened this

The problem is the selector. $("#message-commands") is not the popup that is created for the selectmenu, but the select element which is still on the page. When changing this to $(".ui-selectmenu") it works:


@gabrielschulhof - Can we add the id of the select with a suffix/prefix to the popup? Similar to what we do for the popup container. This way we keep unique id's, but people would have a selector to target a specific selectmenu popup.

@kevinbhayes - You had the script in the body and no div[data-role="page"]. This results in two select buttons. See the last paragraph of this page: In general we recommend to put scripts in the head.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.