Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IE and requestAnimationFrame #91

Closed
box-turtle opened this issue Apr 17, 2015 · 3 comments
Closed

IE and requestAnimationFrame #91

box-turtle opened this issue Apr 17, 2015 · 3 comments

Comments

@box-turtle
Copy link

I'm running into an issue with the datepicker and IE.

I'm also using react-router with a babel/webpack workflow.

The error that appears when loading a page with the datpicker is "Invalid Calling Object" and it originates in /lib/util/dom/requestAnimationFrame. I believe it has to do with some weirdness in how IE fails when you alias the reference to RAF.

If I add this line:

  raf = raf.bind(window);

right after line 20 it fixes the issue.

Now the datepicker on the sample page works perfectly in IE so I suspect this could have something to do with how babel processes the files. Thought I'd post here in case anyone else also has this problem.

I found a similar issue with requestAnimationFrame and IE while investigating scrolling in fixed-data-table - see facebookarchive/fixed-data-table#15

@jquense
Copy link
Owner

jquense commented Apr 18, 2015

that's really interesting. Are you saying the the docs page does work but fails in your use in IE? the docs page also uses webpack/react router so that my complicate your theory... I think I can at least be more defensive about it and make sure I'm binding or calling the method directly on window

@box-turtle
Copy link
Author

Yes the doc page works perfectly in IE - no unhandled exceptions thrown at all.

My version of babel is a little newer than the one in the repo, maybe I'll match my versions and see if I still see the issue. Seems like it has to be something particular to my setup. I'll post back here if I figure anything out.

Thanks for the quick response and the great work on these widgets - they are outstanding.

@box-turtle
Copy link
Author

I'm going to close this - the issue doesn't exist when I do a production build, only when running webpack with dev server/hot loader, so I don't think it's a react-widgets issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants