Giter Site home page Giter Site logo

Comments (7)

aarongustafson avatar aarongustafson commented on June 30, 2024

I addressed this in an earlier pull request. I don't think it's in yet.

On Friday, September 7, 2012 at 7:42 AM, Magnus Holm wrote:

"-ms-transition" in document.documentElement.style returns false, not undefined in IE9, so the script thinks that IE9 supports CSS transitions.
This is what causes #19 (#19).

β€”
Reply to this email directly or view it on GitHub (#25).

from responsive-carousel.

judofyr avatar judofyr commented on June 30, 2024

Link? This is broken in so many ways that I'm surprised no-one has noticed it:

Here's the code:

var prefixes = " -webkit- -moz- -o- -ms- ".split( " " ),
    supported = false;

while( prefixes.length ){
  if( prefixes.shift() + "transition" in document.documentElement.style !== undefined ){
    supported = true;
  }
}
return supported;
  1. Why not just use return true inside the loop instead of using a temporary variabel?
  2. The "in" operator always returns either true/false. It can never be undefined. This means that the condition will always be true.
  3. CSS attributes are JSified, so "-moz-transition" in document.documentElement.style is false in all browser. "MozTransition" on the other hand…

Here's a working version:

var prefixes = " Webkit Moz O ms ".split( " " );
while (prefixes.length) {
  if (prefixes.shift() + "Transition" in document.documentElement.style) return true;
}
return false;

from responsive-carousel.

aarongustafson avatar aarongustafson commented on June 30, 2024

I have 2:

easy-designs@1ff143d

and

easy-designs@a2b25df

from responsive-carousel.

judofyr avatar judofyr commented on June 30, 2024

Well, 1ff143d disables CSS3 transitions in Firefox, Opera and IE versions that actually support CSS3 transitions.

from responsive-carousel.

aarongustafson avatar aarongustafson commented on June 30, 2024

I just tested against FF15 without any issues and had previously tested it in the others. I will double check it again today while I am working on the code.

from responsive-carousel.

aarongustafson avatar aarongustafson commented on June 30, 2024

Updated code for the test has been added to my pull request.

from responsive-carousel.

jefflembeck avatar jefflembeck commented on June 30, 2024

No longer applicable, thank you!

from responsive-carousel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.