Closed adammessinger closed 13 years ago
typo in code example. Closed by 0745af1292dfa35e1744200283ba79c8e8162303
I already noticed and corrected for that in the example I posted, which uses "nativeMenu" instead of "nativemenu". There's still a JS error.
scott,
I commented a bit later on this here:
https://github.com/jquery/jquery-mobile/commit/67987925b43b427040a5a56e438de1e636716941
The select menu isn't defined on mobileinit just as page wasn't previously. We had to move page above core in the build process to fix that issue. It was a temporary fix in that case and doesn't really make sense in this case either.
It might be time to sort out a simple way to configure the widgets before they are created. Possibly defining their options hash before defining the widget itself?
$mobile.selectmenu.options
Which can then be used when the widgets are built.
scott,
[update: config -> options naming convention]
https://github.com/johnbender/jquery-mobile/compare/f944333...config
Thats a sample configuration setup that could be used like so:
$(document).bind('mobileinit',function(){
$.mobile.options.selectmenu.nativeMenu = true;
});
and is pretty trivial to implement with the current widgets and include order.
I'm consulting the team on my proposed solution. Hopefully we'll get this sorted out in the next day or so.
Thanks for your patience adam.
I'm not sure if this has to do with the same issue. Basically i was looking for a function to disable the "removing of null value" from the select box and i found the code below in the docs:
$.mobile.selectmenu.prototype.options.hidePlaceholderMenuItems = false;
But when i include it within the mobileinit function it complains that mobile.selectmenu is undefined.
Programatically enabling native select menus using the code given in the select docs renders a jQM site unusable and produces the following error in Firebug:
Example here