Loads jquery 2.0.0 instead of failing back to 1.7.1 #158

Merged
merged 1 commit into from May 22, 2013

Projects

None yet

3 participants

@kberridge
Contributor

Fixes an issue with jquery.hotkeys where any keystroke would cause the profiler UI to toggle. When 2.0.0 is used, or any version before 1.7, jquery.hotkeys will hook up special events to the wrong version of jquery (not the one miniprofiler loads: 1.7.1). This change fixes it only for 2.0.0.

@kberridge kberridge Loads jquery 2.0.0 instead of failing back to 1.7.1
Fixes an issue with jquery.hotkeys where any keystroke would cause the profiler UI to toggle.  When 2.0.0 is used, or any version before 1.7, jquery.hotkeys will hook up special events to the wrong version of jquery (not the one miniprofiler loads: 1.7.1).  This change fixes it only for 2.0.0.
5d0ba94
@SamSaffron
Owner

seems fine cc @dixon

@SamSaffron SamSaffron merged commit e2e00d5 into SamSaffron:master May 22, 2013
@jeradrose
Contributor

This change breaks IE. The expressions are not grouped and thus the jQueryVersion[0] tries to evaluate even when jQueryVersion is undefined.

Fix would be to do something like this:

if (jQueryVersion && ((parseInt(jQueryVersion[0]) == 2) || (parseInt(jQueryVersion[0]) < 2 && parseInt(jQueryVersion[1]) >= 7))) 

Basically, add parens surrounding the second thru fourth expressions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment