[Snyk] Upgrade focus-trap from 6.3.0 to 6.7.1 #2166
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Release notes
Package name: focus-trap
Patch Changes
Minor Changes
document
option to support focus traps inside<iframe>
elements (#97)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 returnfalse
to leave focus where it is at the time of deactivation. (#485)Patch Changes
KeyboardEvent
was not being passed toescapeDeactivates
option when it's a function (#498)initialFocus
option not supporting function returningfalse
as documented (#490)Patch Changes
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:
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.
75be463:
escapeDeactivates
can now be either a boolean (as before) or a function that takes an event and returns a boolean.Patch Changes
delayInitialFocus
timer created for the second trap before during its activation sequence.Patch Changes
Minor Changes
checkCanFocusTrap()
,onPostActivate()
,checkCanReturnFocus()
, andonPostDeactivate()
.Patch Changes
SVGElement
as a supported type of "DOM node" since it supports thefocus()
method, same asHTMLElement
.Minor Changes
focus-trap
does not currently leverage the newdisplayCheck
option.Patch Changes
Minor Changes
clickOutsideDeactivates
can now also be a function that returns aboolean
, similar toallowOutsideClick
. The function receives theMouseEvent
that triggered the click. (#289)Patch Changes
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