react-modal icon indicating copy to clipboard operation
react-modal copied to clipboard

Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'.

Open moroshko opened this issue 4 years ago • 4 comments

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:

  1. Open Codesandbox
  2. Click "Open modal"
  3. 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)?

moroshko avatar May 17 '21 23:05 moroshko

Which browser the error happened?

diasbruno avatar May 18 '21 00:05 diasbruno

I tested in Chrome 90.0.4430.212

moroshko avatar May 18 '21 00:05 moroshko

@diasbruno What do you think about adding the window prop? Do you have other ideas?

moroshko avatar May 24 '21 01:05 moroshko

Is this fixed in 3.14.1? I cannot reproduce it.

TusharShahi avatar Jun 12 '21 10:06 TusharShahi