-
Notifications
You must be signed in to change notification settings - Fork 46.8k
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
Suspense/lazy not working as expected in IE11 (display: none not being removed) #14114
Comments
Is it IE11 specific or a general bug? There’s a few general bugs we’re tracking right now. |
IE specific, it worked on Chrome/Safari, but in IE11 the display: none; was left on all the child components. I was able to go and check that style off in the inspector and see the components were loaded just fine. |
If I take your CodeSandbox, add react-app-polyfill/ie9 and edit the package.json to compile for IE11 support: https://codesandbox.io/s/5wnv4nj6mk – then download that, build it locally, and deploy to now.sh at https://build-aoelkthmva.now.sh/, then I get a page that successfully displays "hello world" when opened in IE11. |
@jaruesink Can you confirm if I'm doing anything different from what you tested? |
Hmm I was hoping it would be as simple as that. But I guess it is more complicated. I'm using it with the router for lazyloading router components. Here is my file that was working everywhere except for IE.
|
Oh, I think I found the bug. |
Setting to null isn't correct; setting to '' is. I opted to use dangerousStyleValue for consistency with the main path that we set things. Fixes facebook#14114. Test Plan: Verified setting to '' works in Chrome and IE11. (Setting to null works in Chrome but not in IE11.)
Setting to null isn't correct; setting to '' is. I opted to use dangerousStyleValue for consistency with the main path that we set things. Fixes #14114. Test Plan: Verified setting to '' works in Chrome and IE11. (Setting to null works in Chrome but not in IE11.)
I love GitHub issues/prs. I can easily track the problem, what caused it, and how to fix it! I was looking for a fix and @sophiebits had one! Thank you! |
Setting to null isn't correct; setting to '' is. I opted to use dangerousStyleValue for consistency with the main path that we set things. Fixes facebook#14114. Test Plan: Verified setting to '' works in Chrome and IE11. (Setting to null works in Chrome but not in IE11.)
Setting to null isn't correct; setting to '' is. I opted to use dangerousStyleValue for consistency with the main path that we set things. Fixes facebook#14114. Test Plan: Verified setting to '' works in Chrome and IE11. (Setting to null works in Chrome but not in IE11.)
@gaearon any ideas when this fix might make it into a release? |
PS: We love the work you do for us all! |
Any updates to this? |
Thanks everyone for this. |
The issue itself has been fixed (I think in 16.7). |
I'm noticing this problem with react version |
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
Suspense adds display: none to all top level child elements in IE11.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:
https://codesandbox.io/s/w0573w2owk
Code sandbox can't render in IE11 either, but in this example I would expect to not see IE11 because the div would have display: none on it.
What is the expected behavior?
To be visible and not have display: none on the children.
Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
I had to revert back to react-loadable to fix this.
The text was updated successfully, but these errors were encountered: