Skip to content

'You tried to return focus to but it is not in the DOM anymore' warning. #577

Closed
@Jacob-Allen

Description

@Jacob-Allen

I have recently upgraded react-modal from 1.7.1 to 3.1.6. I am now getting a warning in the console whenever react-modal unmounts.

Steps to reproduce:

  1. Mount a component that is using React Modal as a child.
  2. Dismount the component has has React Modal as a child. (this happens for me when I navigate between routes)

Expected behavior:

  1. I'm not sure if this warning is due to incorrect implementation on my part or if this is expected behavior.

Additional notes:

The modals are behaving normally, I am just unsure why the focus manager is giving me this warning.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions