react-modal
react-modal copied to clipboard
Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'.
When the Modal is rendered inside an iframe, the wrong window is used here, causing this error:
Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'.
To reproduce:
- Open Codesandbox
- Click "Open modal"
- Press Tab
Shall we add a window prop to the Modal so that consumers could pass their own window object (iframe's window in the example above)?
Which browser the error happened?
I tested in Chrome 90.0.4430.212
@diasbruno What do you think about adding the window prop? Do you have other ideas?
Is this fixed in 3.14.1? I cannot reproduce it.