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.4.1 to 0.4.2

6

dist/focusMerge.js

@@ -8,8 +8,4 @@ 'use strict';

var _tabOrder = require('./utils/tabOrder');
var _DOMutils = require('./utils/DOMutils');
var _tabUtils = require('./utils/tabUtils');
var _firstFocus = require('./utils/firstFocus');

@@ -123,3 +119,3 @@

var outerNodes = (0, _tabOrder.orderByTabIndex)((0, _tabUtils.getFocusables)([commonParent])).map(function (_ref3) {
var outerNodes = (0, _DOMutils.getTabbableNodes)([commonParent]).map(function (_ref3) {
var node = _ref3.node;

@@ -126,0 +122,0 @@ return node;

8

dist/utils/DOMutils.js

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

});
exports.parentAutofocusables = exports.getTabbableNodes = exports.getCommonParent = exports.notHiddenInput = exports.isVisible = undefined;
exports.parentAutofocusables = exports.getTabbableNodes = exports.filterFocusable = exports.getCommonParent = exports.notHiddenInput = exports.isVisible = undefined;

@@ -53,3 +53,3 @@ var _tabOrder = require('./tabOrder');

var findFocusable = function findFocusable(nodes) {
var filterFocusable = exports.filterFocusable = function filterFocusable(nodes) {
return (0, _array.toArray)(nodes).filter(function (node) {

@@ -63,7 +63,7 @@ return isVisible(node);

var getTabbableNodes = exports.getTabbableNodes = function getTabbableNodes(topNodes) {
return (0, _tabOrder.orderByTabIndex)(findFocusable((0, _tabUtils.getFocusables)(topNodes)));
return (0, _tabOrder.orderByTabIndex)(filterFocusable((0, _tabUtils.getFocusables)(topNodes)));
};
var parentAutofocusables = exports.parentAutofocusables = function parentAutofocusables(topNode) {
return findFocusable((0, _tabUtils.getParentAutofocusables)(topNode));
return filterFocusable((0, _tabUtils.getParentAutofocusables)(topNode));
};
{
"name": "focus-lock",
"version": "0.4.1",
"version": "0.4.2",
"description": "DOM trap for a focus",

@@ -5,0 +5,0 @@ "main": "dist/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