Open mikaelkristiansson opened 5 years ago
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: https://github.com/gatsbyjs/gatsby/issues/20582
@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.
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?
doScroll in ie10 needs to be called as a function for hack to work properly.
Fix for issue #53