focus-trap
Advanced tools
Comparing version 2.0.1 to 2.0.2
# Changelog | ||
## 2.0.2 | ||
- Fixed: `clickOutsideDeactivates` no longer triggers deactivation when you click *inside* the trap. | ||
## 2.0.1 | ||
@@ -4,0 +8,0 @@ |
@@ -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", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14123
159