Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

fix browser detection for jQuery > 2.0 #1246

Merged
merged 3 commits into from

3 participants

Sebastian Widmer David Schnur Nick Schonning
Sebastian Widmer

jQuery removed $.support.leadingWhitespace from jquery greater 2.0
because support was dropped for IE 7/8. So if property is undefined,
we are pretty shure its ie > 8 or jQuery does not support the browser
anyway.

bastjan added some commits
Sebastian Widmer bastjan fix browser detection for jQuery > 2.0
jQuery removed $.support.leadingWhitespace from jquery greater 2.0
because support was dropped for IE 7/8. So if property is undefined,
we are pretty shure its ie > 8 or jQuery does not support the browser
anyway.
143c61a
Sebastian Widmer bastjan no confusing use of "!" 6fd170d
Nick Schonning nschonni added the triage label
David Schnur
Owner

Thanks for the patch! Could you just add a comment above that line to explain the assumption, please? I want to avoid someone coming along later and breaking the logic because they don't understand why it's there.

David Schnur dnschnur added bug and removed triage labels
David Schnur dnschnur added this to the Release 0.9 milestone
David Schnur dnschnur self-assigned this
Sebastian Widmer

Sure...

David Schnur dnschnur merged commit 0b03106 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 11, 2014
  1. Sebastian Widmer

    fix browser detection for jQuery > 2.0

    bastjan authored
    jQuery removed $.support.leadingWhitespace from jquery greater 2.0
    because support was dropped for IE 7/8. So if property is undefined,
    we are pretty shure its ie > 8 or jQuery does not support the browser
    anyway.
  2. Sebastian Widmer

    no confusing use of "!"

    bastjan authored
Commits on Feb 12, 2014
  1. Sebastian Widmer
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/jquery.flot.js
5 src/jquery.flot.js
View
@@ -361,7 +361,10 @@ Licensed under the MIT license.
c = sin.toFixed(6), // when we add them to the string
transformRule;
- if ($.support.leadingWhitespace) {
+ // Detect IE7/8 to use microsofts proprietary matrix filter
+ // $.support.leadingWhitespace is false on IE7/8, true on other browsers and
+ // undefined with jQuery greater 2.0, which dropped support for IE7/8.
+ if ($.support.leadingWhitespace !== false) {
// The transform origin defaults to '50% 50%', producing
// blurry text on some browsers (Chrome) when the width or
Something went wrong with that request. Please try again.