Socket
Socket
Sign inDemoInstall

focus-trap

Package Overview
Dependencies
Maintainers
1
Versions
81
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

focus-trap - npm Package Versions

1
9

6.9.2

Diff

Changelog

Source

6.9.2

Patch Changes

  • ef0ce48: Handle unexpected param (true) passed as the value for the initialFocus, fallbackFocus, and setReturnFocus options: Ignore and perform default behavior.
stefcameron
published 6.9.1 •

Changelog

Source

6.9.1

Patch Changes

  • 83262a7: Bumps tabbable to v5.3.2 to pick-up a fix to displayCheck=full (default) option behavior that caused issues with detached nodes.
stefcameron
published 6.9.0 •

Changelog

Source

6.9.0

Minor Changes

  • 2a57e4b: Add new trap.active and trap.paused readonly state properties on the trap so that the trap's active/paused state can be queried.

Patch Changes

  • 8fd49df: Fixed bug where clickOutsideDeactivate handler would get called on the 'click' event even if the node clicked was in the trap. As with 'mousedown' and 'touchstart' events where this option is also used, the handler should only get called if the target node is outside the trap.
  • c32c60a: Fixed: onDeactivate, onPostDeactivate, and checkCanReturnFocus options originally given to createFocusTrap() were not being used by default when calling trap.deactivate({...}) with an option set even if that option set didn't specify any overrides of these options.
stefcameron
published 6.8.1 •

Changelog

Source

6.8.1

Patch Changes

  • 7c86111:
    • Bump tabbable to ^5.3.1 (fixing previous update which was incorrectly set to 5.3.0).
    • Fix tabbableOptions not being used in all internal uses of tabbable APIs.
    • Expose displayCheck option in tabbableOptions typings and pass it through to tabbable APIs.
    • Add info to README about testing traps in JSDom (which is not officially supported).
stefcameron
published 6.8.0 •

Changelog

Source

6.8.0

Minor Changes

  • 21458c9: Bumps tabbable to v5.3.0 and includes all changes from the past v6.8.0 beta releases. The big new feature is opt-in Shadow DOM support in tabbable, and a new getShadowRoot tabbable option exposed in a new tabbableOptions focus-trap config option.
    • ⚠️ This will likely break your tests if you're using JSDom (e.g. with Jest). See testing in JSDom for more info.
stefcameron
published 6.8.0-beta.2 •

Changelog

Source

6.8.0-beta.2

  • When updating tabbable nodes, make sure that getShadowRoot tabbable option is also passed to focusable().
  • Fix bug where having a tabbable node inside a web component in the middle of a tab sequence would cause the tab key to seemingly stop working just before focus should move to it ((#643)[https://github.com/focus-trap/focus-trap/issues/643]).
  • Bumps tabbable to v5.3.0-beta.1
stefcameron
published 6.8.0-beta.1 •

Changelog

Source

6.8.0-beta.1

  • Previous beta didn't include new source. This one does.
stefcameron
published 6.7.3 •

Changelog

Source

6.7.3

Patch Changes

  • ab20d3d: Fix issue with focusing negative tabindex node and then tabbing away when this node is not the last node in the trap's container ((#611)[https://github.com/focus-trap/focus-trap/issues/611])
stefcameron
published 6.8.0-beta.0 •

Changelog

Source

6.8.0-beta.0

  • Adds new tabbableOptions configuration option, which allows specifically for the new getShadowRoot Tabbable configuration option: focusTrap.createFocusTrap(rootElement, { tabbableOptions: { getShadowRoot: (node) => closedShadowRoot } }), for example (where your code has the reference to closedShadowRoot previously created on node which Tabbable cannot find on its own).
  • Bumps tabbable to v5.3.0-beta.0
stefcameron
published 6.7.2 •

Changelog

Source

6.7.2

Patch Changes

  • c932330: Fixed bug where tabbing forward from an element with negative tabindex that is last in the trap would result in focus remaining on that element (565)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc