React: Error Rendering Inputs in Separate Window using Portals

Created on 4 Dec 2017  路  12Comments  路  Source: facebook/react

Do you want to request a feature or report a bug?

Bug

What is the current behavior?
I am using React's Portals to render react elements in a completely separate (popup) window. When I attempt to render an <input /> in the popout window, the following error occurs and React fails to render (the window turns white):

'enumerable' attribute on the property descriptor cannot be set to 'true' on this object in react-dom.development.js

What is the expected behavior?
The <input /> renders correctly in the popout window.

Steps to reproduce:
I have created a repo you can clone to recreate the issue as I cannot use a service like JSFiddle because of a no access-control-allow-origin error. The main browser window and popout window are on separate domains (popout is machine local) if I use JSFiddle. The repo is just modified clone of create-a-react-app.

The steps to reproduce are included in repo's README.md. The files of interest in the repo are _App.js_ and _PopoutPortal.js_.

Repo: kgorgi/react-popout-bug

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?

  • This bug only occurs in Edge and IE 11. The popout window renders correctly in Chrome and Firefox.
  • I have only tested this bug on React 16.2.0
  • OS: Windows 10
IE DOM medium Needs Investigation good first issue

Most helpful comment

I'm still having this problem with Edge 44.17763.1.0 and react-dom 16.7.0. It works fine in IE11.

All 12 comments

Tagging as needing investigation.

Hey Dan, can I help in investigation?

Sure :-) Try to reproduce and see what and where causes it.

@gaearon I have reproduced that and tried to solve it to, can you check the pr to see if the implementation is what you are expecting

Can you prepare a React-less reproduction of this so we can file a bug against Edge? Or has this been solved in the latest Edge?

Fixed in https://github.com/facebook/react/pull/11870 but I'll keep it open. The next action item is to prepare a minimal reproduction that doesn't involve React.

@gaearon sure i will do that.

Note: per https://github.com/facebook/react/pull/11870#issuecomment-371108838, the problem is not solved.

I'm looking to make my first contribution and can take a look at this issue!

It seems that this can be closed per https://github.com/facebook/react/pull/11870#issuecomment-377915743

I'm still having this problem with Edge 44.17763.1.0 and react-dom 16.7.0. It works fine in IE11.

I'm having this problem too with edge version 42.17134.1.0 with React 16.4 and react-dom 16.8.6. Have attached screenshot of where error is occurring
Screenshot (6)

@gearon

Was this page helpful?
0 / 5 - 0 ratings