Skip to content

Commit

Permalink
issue 11768 - Error Rendering Inputs in Separate Window using Portals…
Browse files Browse the repository at this point in the history
… in ie11 (facebook#11870)

Work around IE/Edge bug when rendering inputs in separate windows via portals
  • Loading branch information
Md Zubair Ahmed authored and yenshih committed Jan 6, 2018
1 parent 9665119 commit 19f0684
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/react-dom/src/client/inputValueTracking.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ function trackValueOnNode(node: any): ?ValueTracker {
}

Object.defineProperty(node, valueField, {
enumerable: descriptor.enumerable,
configurable: true,
get: function() {
return descriptor.get.call(this);
Expand All @@ -80,6 +79,13 @@ function trackValueOnNode(node: any): ?ValueTracker {
descriptor.set.call(this, value);
},
});
// We could've passed this the first time
// but it triggers a bug in IE11 and Edge 14/15.
// Calling defineProperty() again should be equivalent.
// https://github.com/facebook/react/issues/11768
Object.defineProperty(node, valueField, {
enumerable: descriptor.enumerable,
});

const tracker = {
getValue() {
Expand Down

0 comments on commit 19f0684

Please sign in to comment.