Socket
Socket
Sign inDemoInstall

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.2.0 to 0.2.1

4

dist/utils/all-affected.js

@@ -11,2 +11,4 @@ 'use strict';

function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
var filterNested = function filterNested(nodes) {

@@ -43,3 +45,3 @@ var l = nodes.length;

if (group) {
return filterNested(Array.from(getTopParent(node).querySelectorAll('[' + _constants.FOCUS_GROUP + '="' + group + '"]:not([' + _constants.FOCUS_DISABLED + '="disabled"])')));
return filterNested([].concat(_toConsumableArray(getTopParent(node).querySelectorAll('[' + _constants.FOCUS_GROUP + '="' + group + '"]:not([' + _constants.FOCUS_DISABLED + '="disabled"])'))));
}

@@ -46,0 +48,0 @@ return [node];

{
"name": "focus-lock",
"version": "0.2.0",
"version": "0.2.1",
"description": "DOM trap for a focus",

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

@@ -16,3 +16,3 @@ # focus-lock

#WHY?
# WHY?
From [MDN Article about accessible dialogs](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_dialog_role):

@@ -26,3 +26,3 @@ - The dialog must be properly labeled

#Implementations
# Implementations

@@ -32,2 +32,3 @@ This is vanilla js base package for:

- [vue-focus-lock](https://github.com/theKashey/vue-focus-lock)
- [dom-focus-lock](https://github.com/theKashey/dom-focus-lock)

@@ -39,3 +40,3 @@

#API
# API

@@ -42,0 +43,0 @@ `default(topNode, lastNode)` (aka setFocus), moves focus inside topNode, keeping in mind that last focus inside was - lastNode

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