Socket
Socket
Sign inDemoInstall

focus-trap

Package Overview
Dependencies
Maintainers
3
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.2.1

Diff

Changelog

Source

6.2.1

Patch Changes

  • f0c2aff: Bump tabbable to 5.1.4 for bug fix.
  • 2ba512b:
    • Refactored code to use function declarations instead of hoisted functions (this should have no bearing on functionality in the build output included in ./dist.
    • Fixed bugs where trap.activate() and trap.deactivate() would not always return the trap (now they do in all circumstances).
  • d26d2e1: Refactoring to use const/let, and simplify a few lines. This does NOT impact the build output published in ./dist, however, and hence does not impact browser support.
stefcameron
published 6.2.0 •

Changelog

Source

6.2.0

Minor Changes

  • 2267d17: Adding support for multiple elements to be passed in #217
stefcameron
published 6.1.4 •

Changelog

Source

6.1.4

Patch Changes

  • 38b6b98: Update tabbable to 5.1.3 to get bug fixes related to detail and summary elements.
stefcameron
published 6.1.3 •

Changelog

Source

6.1.3

Patch Changes

  • 6a39217: Close the gap with #172 and bump tabbable to 5.1.2 which has a similar fix.
  • 756c79d: Fix #172 (again): Transpile ESM bundle down to the same browser target used for the CJS and UMD bundles. ESM is just the module system, not the browser target.
stefcameron
published 6.1.2 •

Changelog

Source

6.1.2

Patch Changes

  • 00674dd: Fix #172: Transpile non-minified bundles so they are compatible with IE11.
  • 679009b: Update tabbable dependency to 5.1.1 to get transpiled non-minified bundles.
stefcameron
published 6.1.1 •

Changelog

Source

6.1.1

Patch Changes

  • fe2b0ad: Fixed #103: returnFocusOnDeactivate is now respected on auto-deactivation with clickOutsideDeactivates=true.
stefcameron
published 6.1.0 •

Changelog

Source

6.1.0

Minor Changes

  • 5174ce1: Add delayInitialFocus option

Patch Changes

  • 53b906b: Change prepublishOnly script to prepare script so that it also runs if someone installs the package directly from the git repo (e.g. from your work in which you fixed a bug or added a feature you're waiting to get merged to master and published to NPM).
  • 31bb28e: Update tabbable dependency to 5.1.0. The most significant update for focus-trap is a bug fix related to fixed-position containers.
stefcameron
published 6.0.1 •

Changelog

Source

6.0.1

Patch Changes

  • 694e2fa: Package main/module entries no longer point to minified bundles.
stefcameron
published 6.0.0 •

Changelog

Source

6.0.0

  • Add boolean value support for allowOutsideClick option.
  • New preventScroll feature to prevent scrolling to the element getting focus if not in the viewport.
  • Changed code formatting to use dangling commas where ES5 supports them.
  • BREAKING: Updated tabbable dependency to the new 5.0.0 release which contains breaking changes to its isTabbableRadio() internal function.
  • Help with tree shaking by having package.json state sideEffects: false to mark this module as having no side effects as a result of merely importing it.
  • BREAKING: This package.json's "main" no longer points to ./index.js in the package (although it still points to a CJS module, so it's possible this actually doesn't break anything). It now has:
    • "main": dist/focus-trap.min.js (the CJS bundle)
    • "module": dist/focus-trap.esm.min.js (the new ESM bundle)
    • the UMD is dist/focus-trap.umd.min.js if needed (convenient for loading directly in an older browser that doesn't support ESM)
    • NOTE: The CJS build no longer provides a function as a default export. Use const { createFocusTrap } = require('focus-trap'); to get the function from before.
    • NOTE: The ESM build does not provide a default export. Use import { createFocusTrap } from 'focus-trap'; to import the module.
  • New ESM Build: Included in dist/focus-trap.esm.*.
  • New UMD Build: Included in dist/focus-trap.umd.*.
davidtheclark
published 5.1.0 •

Changelog

Source

5.1.0

  • Add setReturnFocus option that allows you to set which element receives focus when the trap closes.
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