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

[Snyk] Upgrade focus-trap from 6.3.0 to 6.7.1 #2166

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

snyk-bot
Copy link

Snyk has created this PR to upgrade focus-trap from 6.3.0 to 6.7.1.

ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.


  • The recommended version is 7 versions ahead of your current version.
  • The recommended version was released 4 months ago, on 2021-09-27.
Release notes
Package name: focus-trap
  • 6.7.1 - 2021-09-27

    Patch Changes

    • 28a069f: Fix bug from #504 where it's no longer possible to create a trap without any options [#525]
  • 6.7.0 - 2021-09-24

    Minor Changes

    • 893dd2c: Add document option to support focus traps inside <iframe> elements (#97)
    • 244f0c1: Extend the setReturnFocus option to receive a reference to the element that had focus prior to the trap being activated when a function is specified. Additionally, the function can now return false to leave focus where it is at the time of deactivation. (#485)

    Patch Changes

    • 60162eb: Fix bug where KeyboardEvent was not being passed to escapeDeactivates option when it's a function (#498)
    • 7b6abfa: Fix how focus-trap determines the event's target, which was preventing traps inside open shadow DOMs from working properly (#496)
    • 14b0ee8: Fix initialFocus option not supporting function returning false as documented (#490)
  • 6.6.1 - 2021-08-14

    Patch Changes

    • 24063d7: Update tabbable to v5.2.1 to get bug fix for disabled fieldsets.
  • 6.6.0 - 2021-07-01

    Minor Changes

    • 281e66c: Add option to allow no initial focus when trap activates via initialFocus: false

      There may be cases where we don't want to focus the first tabbable element when a focus trap activates.

      Examples use-cases:

      • Modals/dialogs
      • On mobile devices where "tabbing" doesn't make sense without a connected Bluetooth keyboard

      In addition, this change ensures that any element inside the trap manually focused outside of focus-trap code will be brought back in focus if focus is somehow found outside of the trap.

      Example usage:

      When the trap activates, there will be no initially focused element inside the new trap.

      const focusTrap = createFocusTrap('#some-container', {
        initialFocus: false,
      });
    • 75be463: escapeDeactivates can now be either a boolean (as before) or a function that takes an event and returns a boolean.

    Patch Changes

    • e2294f0: Fix race condition when activating a second trap where initial focus in the second trap may be thwarted because pausing of first trap clears the delayInitialFocus timer created for the second trap before during its activation sequence.
  • 6.5.1 - 2021-06-18

    Patch Changes

    • c38bf3f: onPostDeactivate should always be called even if returnFocus/OnDeactivate is disabled.
  • 6.5.0 - 2021-06-07

    Minor Changes

    • 278e77e: Adding 4 new configuration event options to improve support for animated dialogs and animated focus trap triggers: checkCanFocusTrap(), onPostActivate(), checkCanReturnFocus(), and onPostDeactivate().

    Patch Changes

    • 8d11e15: Improve docs and types for most options, adding SVGElement as a supported type of "DOM node" since it supports the focus() method, same as HTMLElement.
  • 6.4.0 - 2021-04-20

    Minor Changes

    • 21c82ce: Bump tabbable from 5.1.6 to 5.2.0. There should be no changes in behavior as a result of this upgrade as focus-trap does not currently leverage the new displayCheck option.

    Patch Changes

    • 1baf62e: Fix focus trapped on initial focus container with tabindex=-1 when pressing shift+tab (#363)
  • 6.3.0 - 2021-01-16

    Minor Changes

    • a882d62: clickOutsideDeactivates can now also be a function that returns a boolean, similar to allowOutsideClick. The function receives the MouseEvent that triggered the click. (#289)

    Patch Changes

    • 4d67dee: Fix a focus escape when pressing TAB after hiding element with focus (#281)
    • ca32014: Bump tabbable from 5.1.4 to 5.1.5
from focus-trap GitHub release notes
Commit messages
Package name: focus-trap

Compare


Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.

For more information:

🧐 View latest project report

🛠 Adjust upgrade PR settings

🔕 Ignore this dependency or unsubscribe from future upgrade PRs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant