@samitouri / QOS-React / commits / ce40f4eafe

issue 11768 - Error Rendering Inputs in Separate Window using Portals in ie11 (#11870)

Work around IE/Edge bug when rendering inputs in separate windows via portals

Md Zubair Ahmed committed Jan 6, 2018 at 00:02 UTC ce40f4eafe32236b8968a2d7793582e47877a38c
1 file changed +7 -1
packages/react-dom/src/client/inputValueTracking.js
+7 -1
@@ -70,7 +70,6 @@ function trackValueOnNode(node: any): ?ValueTracker {
70 }
71
72 Object.defineProperty(node, valueField, {
73 - enumerable: descriptor.enumerable,
73 configurable: true,
74 get: function() {
75 return descriptor.get.call(this);
@@ -80,6 +79,13 @@ function trackValueOnNode(node: any): ?ValueTracker {
79 descriptor.set.call(this, value);
80 },
81 });
82 + // We could've passed this the first time
83 + // but it triggers a bug in IE11 and Edge 14/15.
84 + // Calling defineProperty() again should be equivalent.
85 + // https://github.com/facebook/react/issues/11768
86 + Object.defineProperty(node, valueField, {
87 + enumerable: descriptor.enumerable,
88 + });
89
90 const tracker = {
91 getValue() {