Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

focus-trap

Package Overview
Dependencies
Maintainers
1
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

focus-trap - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

4

CHANGELOG.md
# Changelog
## 2.0.2
- Fixed: `clickOutsideDeactivates` no longer triggers deactivation when you click *inside* the trap.
## 2.0.1

@@ -4,0 +8,0 @@

5

index.js

@@ -133,3 +133,3 @@ var tabbable = require('tabbable');

function checkPointerDown(e) {
if (config.clickOutsideDeactivates) {
if (config.clickOutsideDeactivates && !container.contains(e.target)) {
deactivate({ returnFocus: false });

@@ -150,3 +150,4 @@ }

e.stopImmediatePropagation();
e.target.blur();
// Checking for a blur method here resolves a Firefox issue (#15)
if (typeof e.target.blur === 'function') e.target.blur();
}

@@ -153,0 +154,0 @@

{
"name": "focus-trap",
"version": "2.0.1",
"version": "2.0.2",
"description": "Trap focus within a DOM node.",

@@ -5,0 +5,0 @@ "main": "index.js",

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