From aec529799abcf490fd39ee42e191ec1680693d6c Mon Sep 17 00:00:00 2001 From: Sophie Alpert Date: Tue, 6 Nov 2018 11:14:16 -0800 Subject: [PATCH] Fix unhiding 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.) --- packages/react-dom/src/client/ReactDOMHostConfig.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react-dom/src/client/ReactDOMHostConfig.js b/packages/react-dom/src/client/ReactDOMHostConfig.js index 56719d96bb169..33951aec7e18e 100644 --- a/packages/react-dom/src/client/ReactDOMHostConfig.js +++ b/packages/react-dom/src/client/ReactDOMHostConfig.js @@ -35,6 +35,7 @@ import { DOCUMENT_NODE, DOCUMENT_FRAGMENT_NODE, } from '../shared/HTMLNodeType'; +import dangerousStyleValue from '../shared/dangerousStyleValue'; import type {DOMContainer} from './ReactDOM'; @@ -442,8 +443,7 @@ export function unhideInstance(instance: Instance, props: Props): void { styleProp.hasOwnProperty('display') ? styleProp.display : null; - // $FlowFixMe Setting a style property to null is the valid way to reset it. - instance.style.display = display; + instance.style.display = dangerousStyleValue('display', display); } export function unhideTextInstance(