Coder Social home page Coder Social logo

Comments (8)

fisshy avatar fisshy commented on June 14, 2024

Sorry for the late answer, will look into it.

from react-scroll.

goldhand avatar goldhand commented on June 14, 2024

MS stops supporting IE 8, 9, & 10 https://support.microsoft.com/en-us/kb/3123303 :)))))

from react-scroll.

cbravo avatar cbravo commented on June 14, 2024

This is actually caused by this plugin relying on using setTimeout to pass params to a callback function in browsers that do not have requestAnimationFrame() in the file animate-scroller.js and this is known not to work in IE which is why you are seeing that behavior.

This stackoverflow lead me to my working solution:
http://stackoverflow.com/questions/12404528/ie-parameters-get-undefined-when-using-them-in-settimeout

also referenced in that stack overflow is the MDN docs:
https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/setTimeout

from react-scroll.

cbravo avatar cbravo commented on June 14, 2024

I know the response is a little late but I was working on a project that uses this lib and has to support ie9 so I thought this would be helpful to those who have had the same struggle.

from react-scroll.

fisshy avatar fisshy commented on June 14, 2024

Ah sweet. thanks for the solution, good to know If i stumble upon this myself =). Thanks!

from react-scroll.

kifahhk avatar kifahhk commented on June 14, 2024

@cbravo can you please publish your solution.
I am still getting the same error for smooth scrolling in IE, even after implementing the Polyfill.

  • error line: requestAnimationFrame(animateTopScroll)

Thanks

from react-scroll.

cbravo avatar cbravo commented on June 14, 2024

For my project I used the solution mentioned here:
https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/setTimeout

I included this script below on my index.html file * before* including the JS for my react application and that completely solved my problem for ie9

<!--[if lte IE 9]><script> (function(f){ window.setTimeout=f(window.setTimeout); window.setInterval=f(window.setInterval); })(function(f){return function(c,t){ var a=[].slice.call(arguments,2);return f(function(){c instanceof Function?c.apply(this,a):eval(c)},t)} }); </script><![endif]-->

from react-scroll.

kifahhk avatar kifahhk commented on June 14, 2024

I think, I have another Issue #55
Thanks anyway

from react-scroll.

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.