Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix focus not always returning to expected element on active=false #139

Merged
merged 2 commits into from
Oct 22, 2020

Commits on Oct 10, 2020

  1. Fix focus not always returning to expected element on active=false

    This is a new fix for the issue identified in #54 after gaining
    a better understanding of the issue.
    
    The `returnFocusOnDeactivate` flag was being special-cased, but
    not always, and the element to which focus should be returned,
    which focus-trap-react attempts to manage on its own (see
    class Constructor comment for reasoning), was not always correct.
    For example, if the trap was deactivated, and then re-activated,
    the 'last focused element before activation' wasn't updated at
    the moment of re-activation, where it could've changed.
    stefcameron committed Oct 10, 2020
    Configuration menu
    Copy the full SHA
    7150846 View commit details
    Browse the repository at this point in the history
  2. Update strong-emus-do.md

    stefcameron committed Oct 10, 2020
    Configuration menu
    Copy the full SHA
    86b464f View commit details
    Browse the repository at this point in the history