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 (#11870)

Work around IE/Edge bug when rendering inputs in separate windows via portals
  • Loading branch information
Md Zubair Ahmed authored and gaearon committed Jan 5, 2018
1 parent e74f3ce commit ce40f4e
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 ce40f4e

Please sign in to comment.