-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Port custom select menus over to use popup #4329
Comments
We need to figure out what happens when a popup contains a custom select menu - the situation pretty much precludes using mutually exclusive popups, favouring a popup stack instead. |
That is a good point. If this adds a ton of code complexity, we could consider forcing all selects in popups to use the native menu. It's a constraint that may be acceptable (is to me). |
Let's find out if this adds a ton of code complexity. I am beginning to develop the distinct impression that a stack is easier to manage than mutual exclusivity. |
@gabrielschulhof - I think you had some info on this on IRC. Mind posting some notes on that here? |
The stuff I talked about on IRC was mostly for @johnbender ... It stems from the following: It turns out that doing a stack has almost exactly the same code as doing mutually exclusive popups. The only additional thing one needs to do is to ensure that whichever popup is the last one to have been opened ends up on top of all the other already-open popups. This means that we need to keep track of the z-index values of each screen that is open, and each popup container. This is pretty simple, since we're already storing the already-open popups in a list. We just keep the max value of each of the two (screen and container) z-index values around, and give each new popup the max plus one. What I was telling @johnbender was that this popup manager can be extended to handle things other than popups as well - i.e., all in-page-navigation can be handled via one of these managers. |
Check out the new branch: https://github.com/jquery/jquery-mobile/tree/popup-widget-stack |
... and the associated docs: http://jquerymobile.com/branches/popup-widget-stack/docs/pages/popup/index.html |
The popup widget is awesome. I might use it with the project I'm working on. What I was asking for with #4369 was an option for opening the popups as full screen dialogs. v1.1 does that with custom select menus already if they exceed a certain size. Check out the "Choose state(s)" select menu on http://jquerymobile.com/demos/1.1.0/docs/forms/selects/custom.html |
I have now moved select over to using popup. |
Once popup is working well, we should re-wrok custom selects to use popup and add this as a dependency.
The text was updated successfully, but these errors were encountered: