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 restoring focus to correct element when closing Dialog component #3365

Merged
merged 2 commits into from
Jul 5, 2024

Commits on Jul 5, 2024

  1. resolve focusable element when recording elements

    Right now, we have to record when a click / mousedown / focus event happens on an element. But when you click on a non-focusable element inside of a focusable element then we record the inner element instead of the outer one.
    
    This happens in this scenario:
    ```html
    <button>
      <span>click me</span>
    </button>
    ```
    
    This solves it by resolving the closest focusable element (and we fallback to the e.target as a last resort)
    RobinMalfait committed Jul 5, 2024
    Configuration menu
    Copy the full SHA
    4cc70f6 View commit details
    Browse the repository at this point in the history
  2. update changelog

    RobinMalfait committed Jul 5, 2024
    Configuration menu
    Copy the full SHA
    7a7782e View commit details
    Browse the repository at this point in the history