getScreenHeight() not compatible with jQuery.noConflict() #2225

Closed
stepro opened this Issue Aug 5, 2011 · 1 comment

2 participants

@stepro

The getScreenHeight() function incorrectly uses "jQuery" instead of "$" when accessing the jQuery object:

function getScreenHeight(){
var orientation = jQuery.event.special.orientationchange.orientation(),
...
}

If you call jQuery.noConflict() after loading jQuery Mobile, "jQuery" will be invalid.

This function should be changed to use the "$" parameter passed to the outer function:

function getScreenHeight(){
var orientation = $.event.special.orientationchange.orientation(),
...
}

This issue was identified in the latest Git build.

@gseguin gseguin was assigned Aug 5, 2011
@stepro

Any update on when or if this might be fixed? This is a commonly used function in the library and many applications will not even start up without the fix if you call jQuery.noConflict(). I see from bug 346 that there was explicit work done to enable support for jQuery.noConflict() so perhaps you would get it in for the RC or the final release?

@gseguin gseguin added a commit that referenced this issue Oct 21, 2011
@gseguin gseguin Fix for issue #2225 e897c66
@gseguin gseguin closed this Oct 21, 2011
@timmywil timmywil pushed a commit that referenced this issue Oct 24, 2011
@gseguin gseguin Fix for issue #2225 118d798
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment