Socket
Socket
Sign inDemoInstall

focus-trap-react

Package Overview
Dependencies
Maintainers
1
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

focus-trap-react - npm Package Compare versions

Comparing version 3.0.4 to 3.0.5

test/activation.test.js

4

CHANGELOG.md
# Changelog
## 3.0.5
- Prevent error in IE edge cases when the previously focused element does not have a `focus()` function.
## 3.0.4

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

2

dist/focus-trap-react.js

@@ -87,3 +87,3 @@ 'use strict';

this.focusTrap.deactivate();
if (this.props.focusTrapOptions.returnFocusOnDeactivate !== false && this.previouslyFocusedElement) {
if (this.props.focusTrapOptions.returnFocusOnDeactivate !== false && this.previouslyFocusedElement && this.previouslyFocusedElement.focus) {
this.previouslyFocusedElement.focus();

@@ -90,0 +90,0 @@ }

{
"name": "focus-trap-react",
"version": "3.0.4",
"version": "3.0.5",
"description": "A React component that traps focus.",

@@ -5,0 +5,0 @@ "main": "dist/focus-trap-react.js",

@@ -66,3 +66,4 @@ const React = require('react');

this.props.focusTrapOptions.returnFocusOnDeactivate !== false &&
this.previouslyFocusedElement
this.previouslyFocusedElement &&
this.previouslyFocusedElement.focus
) {

@@ -69,0 +70,0 @@ this.previouslyFocusedElement.focus();

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc