Fix unhiding in IE11 (#14126)
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.)
Sophie Alpert committed
Nov 6, 2018 at 11:24 UTC
e4512991c91eee4117937d17b9b4749e2173f046
1 file changed
+2
-2
packages/react-dom/src/client/ReactDOMHostConfig.js
+2
-2
@@ -35,6 +35,7 @@ import {
35
DOCUMENT_NODE,
36
DOCUMENT_FRAGMENT_NODE,
37
} from '../shared/HTMLNodeType';
38
+import dangerousStyleValue from '../shared/dangerousStyleValue';
39
40
import type {DOMContainer} from './ReactDOM';
41
@@ -442,8 +443,7 @@ export function unhideInstance(instance: Instance, props: Props): void {
443
styleProp.hasOwnProperty('display')
444
? styleProp.display
445
: null;
445
- // $FlowFixMe Setting a style property to null is the valid way to reset it.
446
- instance.style.display = display;
446
+ instance.style.display = dangerousStyleValue('display', display);
447
}
448
449
export function unhideTextInstance(