React-modal: Non-actionable warning in console: You tried to return focus to null but it is not in the DOM anymore

Created on 12 Nov 2014  路  6Comments  路  Source: reactjs/react-modal

I am seeing a lot of messages in the console: You tried to return focus to null but it is not in the DOM anymore. I am unsure how to make this warning go away.

Most helpful comment

Still seeing this warning too. :(

Reproduce steps:

  1. Construct 2 modals, named it modal_A and modal_B.
  2. Open modal_A (with one button).
  3. In modal_A 's click handler, try to close modal_A and open modal_B.
  4. When you try to close modal_B, you can see the warning messages in console window.

All 6 comments

I'm having this issue still, as well as issues with a text field not keeping its focus in Chrome.

@misuba I'm with you there. I get the warning almost every time state most places in my app change, even when the modal is not open.

I am seeing this too. @mzabriskie can we reopen this issue?

Still seeing this warning too. :(

Reproduce steps:

  1. Construct 2 modals, named it modal_A and modal_B.
  2. Open modal_A (with one button).
  3. In modal_A 's click handler, try to close modal_A and open modal_B.
  4. When you try to close modal_B, you can see the warning messages in console window.

I'm getting this warning since I've upgraded to React v16

@jccode @mrkvngrkn Please follow issue #577. We are discussing how we are going to handle this properly.

Was this page helpful?
0 / 5 - 0 ratings