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

focus-lock

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

focus-lock - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

7

dist/focusMerge.js

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

var findAutoFocused = function findAutoFocused(node) {
return !!node.autofocus;
return !!node.autofocus || !!node.dataset.autofocus;
};

@@ -24,2 +24,7 @@

// focus is inside
if (innerNodes.indexOf(activeElement) >= 0) {
return undefined;
}
var activeIndex = outerNodes.indexOf(activeElement);

@@ -26,0 +31,0 @@ var lastIndex = outerNodes.indexOf(lastNode || activeIndex);

2

package.json
{
"name": "focus-lock",
"version": "0.0.3",
"version": "0.0.4",
"description": "DOM trap for a focus",

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

@@ -5,3 +5,3 @@ import { orderByTabIndex } from './utils/tabOrder';

const findAutoFocused = node => !!node.autofocus;
const findAutoFocused = node => !!node.autofocus || !!node.dataset.autofocus;

@@ -13,2 +13,7 @@ export const newFocus = (innerNodes, outerNodes, activeElement, lastNode, autoFocused) => {

// focus is inside
if (innerNodes.indexOf(activeElement) >= 0) {
return undefined;
}
const activeIndex = outerNodes.indexOf(activeElement);

@@ -15,0 +20,0 @@ const lastIndex = outerNodes.indexOf(lastNode || activeIndex);

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