Fix for Issue 811 - All resolution breakpoint classes added to <html> element, throws off label and form element flow on narrow screens.

- We were firing off our fake orientationchange event before the viewport meta tag is injected. This causes us to get the default document width for the device which is much wider than the actual device-width. We now fire off the event after the dom ready event fires.
This commit is contained in:
Kin Blas 2011-01-14 13:37:47 -08:00
parent 5b4c23b67d
commit cd344f0440

View file

@ -101,7 +101,14 @@ $(document).bind("mobileinit.htmlclass", function(){
//add classes to HTML element for min/max breakpoints
detectResolutionBreakpoints();
});
});
/* Manually trigger an orientationchange event when the dom ready event fires.
This will ensure that any viewport meta tag that may have been injected
has taken effect already, allowing us to properly calculate the width of the
document.
*/
$(function(){
//trigger event manually
$window.trigger( "orientationchange.htmlclass" );
});