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

fix support for ie10 #59

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

mikaelkristiansson
Copy link

@mikaelkristiansson mikaelkristiansson commented Apr 2, 2019

doScroll in ie10 needs to be called as a function for hack to work properly.

Fix for issue #53

@andrejpavlovic
Copy link

This fix seems to scroll the page down as soon as it loads due to call to doc.documentElement.doScroll(). I'm not sure how this fixes anything. I've logged the bug on gatsby as well: gatsbyjs/gatsby#20582

@mikaelkristiansson
Copy link
Author

@andrejpavlovic this fix is because ie10 doesn't support window.onload. we need to create this hack to poll for document to be ready. When it does not return as an error document is ready.
What we could do is change it from doScroll() to doScroll('left') to prevent scrolling down.

@andrejpavlovic
Copy link

andrejpavlovic commented Jan 13, 2020

I've seen doScroll('left') being used, so that should work in most cases. I'm not clear where the polling happens, since I don't see a loop in the code. My understanding is that the documentElement.doScroll check is there just to determine if it is <= ie10. Does calling the doScroll function trigger the domloaded event somehow?

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

Successfully merging this pull request may close these issues.

2 participants