Skip to content

fix(deps): update dependency focus-trap to v8#2685

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/focus-trap-8.x
Open

fix(deps): update dependency focus-trap to v8#2685
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/focus-trap-8.x

Conversation

@renovate

@renovate renovate Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
focus-trap ^7.8.0^8.0.0 age confidence

Release Notes

focus-trap/focus-trap (focus-trap)

v8.2.1

Compare Source

Patch Changes
  • 7e0e518: Fixes lifecycle ordering bug introduced in v8.0.0 that always delays the order even if delayInitialFocus=false, delayReturnFocus=false, checkCanFocusTrap=undefined, checkCanReturnFocus=undefined (which would indicate a fully synchronous activation/pause/unpause/deactivation process) #​1862
  • 2cba31e: Improve shadow DOM focus handling for nested traps by ensuring a parent trap resumes using the innermost active element (#​1885)

v8.2.0

Compare Source

Minor Changes
  • 567dbe1: Add new delayReturnFocus option (default true) to control whether return focus and onPostDeactivate are deferred by one frame (#​1689).
Patch Changes
  • b70e8d9: Fix bug where removing the ancestor of a focused node within a trap would result in focus landing on the body instead of remaining in the trap (#​1660).

v8.1.0

Compare Source

Minor Changes
  • 642f7f2: Update lifecycle hooks to include the associated focus trap as a parameter.

v8.0.1

Compare Source

Patch Changes
  • 7d5010e: Loosen checkCanFocusTrap Promise resolution type to unknown to make it easier to use Promise.all() or Promise.allSettled() as the returned Promise (Promise<void> was causing issues because those Promise APIs do not resolve with a void value).

v8.0.0

Compare Source

Major Changes
  • b6ea4b5: Breaking: Fixed a long-standing bug where onPostActivate() would be called before the initial focus node was focused and the trap was fully activated. (#​1747)
    • By default (and for many years now), a trap delays setting focus to the initial focus node to the next frame (setTimeout(0)) but wasn't delaying calling onPostActivate() until after that delay.
    • With the new isolateSubtrees='aria-hidden' option, the currently-focused node's container (a non-subtree being "disabled") would get hidden before the delay was up, resulting in Chrome preventing the effect of aria-hidden on that subtree with a warning in the console due to the container being hidden still containing focus (e.g. the "activate trap" button).
    • With the fix, subtree isolation and the call to onPostActivate() await the initial focus delay (if there is one, which is default behavior; remove it with delayInitialFocus=false) before being applied/called.
    • This may cause tests to fail, requiring the addition of slight delays before testing a given state (e.g. await waitFor(() => expect(initialFocusNode).toBeFocused()).
    • It may also disrupt current assumptions about the state of the initial focus node in code that runs in your onPostActivate() handler (prior to this change, that node would not be focused yet; after this change, it will be focused).

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate Bot force-pushed the renovate/focus-trap-8.x branch from 1fc9f0b to bca54b7 Compare June 15, 2026 07:48
@renovate renovate Bot changed the title Update dependency focus-trap to v8 fix(deps): update dependency focus-trap to v8 Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants