Bot releases are visible (Hide)
Published by github-actions[bot] over 2 years ago
getShadowRoot
tabbable option exposed in a new tabbableOptions
focus-trap config option.Published by github-actions[bot] over 2 years ago
Published by github-actions[bot] about 3 years ago
Published by github-actions[bot] about 3 years ago
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 return false
to leave focus where it is at the time of deactivation. (#485)KeyboardEvent
was not being passed to escapeDeactivates
option when it's a function (#498)initialFocus
option not supporting function returning false
as documented (#490)Published by github-actions[bot] about 3 years ago
Published by github-actions[bot] over 3 years ago
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.
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.
delayInitialFocus
timer created for the second trap before during its activation sequence.Published by github-actions[bot] over 3 years ago
Published by github-actions[bot] over 3 years ago
checkCanFocusTrap()
, onPostActivate()
, checkCanReturnFocus()
, and onPostDeactivate()
.SVGElement
as a supported type of "DOM node" since it supports the focus()
method, same as HTMLElement
.Published by github-actions[bot] over 3 years ago
focus-trap
does not currently leverage the new displayCheck
option.Published by github-actions[bot] almost 4 years ago
clickOutsideDeactivates
can now also be a function that returns a boolean
, similar to allowOutsideClick
. The function receives the MouseEvent
that triggered the click. (#289)Published by github-actions[bot] almost 4 years ago
Array.findIndex()
not supported in that browser (#257)Published by github-actions[bot] almost 4 years ago
fallbackFocus
node has been configured in the trap's options). Also, the most-recently-focused node is more reliably tracked now, should focus somehow escape the trap and be brought back in by the trap, resulting in the truly most-recently-focused node to regain focus if that ever happens.Published by github-actions[bot] almost 4 years ago
./dist
.trap.activate()
and trap.deactivate()
would not always return the trap (now they do in all circumstances)../dist
, however, and hence does not impact browser support.Published by github-actions[bot] almost 4 years ago
Published by github-actions[bot] almost 4 years ago
Published by github-actions[bot] about 4 years ago
tabbable
to 5.1.2 which has a similar fix.Published by github-actions[bot] about 4 years ago
Published by github-actions[bot] about 4 years ago
returnFocusOnDeactivate
is now respected on auto-deactivation with clickOutsideDeactivates=true
.