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

how to disable parent window elements while modal window is opened

Open cullsin opened this issue 6 years ago • 2 comments

Summary:

When I access modal window, parent elements are getting invoked or triggered.

Steps to reproduce:

  1. have a input element in the parent window
  2. open a modal window
  3. when you click the inside the modal, input element get focused or we can enter value in the input element

Expected behavior:

When I click the pop-up window, It shouldn't react with parent elements.

Link to example of issue:

Additional notes:

cullsin avatar Sep 20 '19 16:09 cullsin

I am experiencing this as well. An input that is focused elsewhere on the page when the modal is opened remains focused. Expected behavior is that focus is passed to the modal. Happens even when modal's shouldFocusOnRender prop is explicitly set to true.

In my case, the input also has the required attribute which causes the browser to render the "Please fill out this field" validation box over the modal when it is opened, which is not good.

This happens in latest Firefox and Chrome.

hobbsgoblin avatar Oct 01 '19 21:10 hobbsgoblin

I'm having this issue too

khevin2 avatar Sep 11 '23 10:09 khevin2