Skip to content

Commit 0409690

Browse files
sophiebitsjetoneza
authored andcommitted
Fix unhiding in IE11 (facebook#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 facebook#14114. Test Plan: Verified setting to '' works in Chrome and IE11. (Setting to null works in Chrome but not in IE11.)
1 parent 2a7da6d commit 0409690

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/react-dom/src/client/ReactDOMHostConfig.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ import {
3535
DOCUMENT_NODE,
3636
DOCUMENT_FRAGMENT_NODE,
3737
} from '../shared/HTMLNodeType';
38+
import dangerousStyleValue from '../shared/dangerousStyleValue';
3839

3940
import type {DOMContainer} from './ReactDOM';
4041

@@ -442,8 +443,7 @@ export function unhideInstance(instance: Instance, props: Props): void {
442443
styleProp.hasOwnProperty('display')
443444
? styleProp.display
444445
: 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);
447447
}
448448

449449
export function unhideTextInstance(

0 commit comments

Comments
 (0)