Socket
Socket
Sign inDemoInstall

focus-lock

Package Overview
Dependencies
1
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.11.3 to 0.11.4

9

dist/es2015/focusMerge.js

@@ -47,3 +47,10 @@ import { NEW_FOCUS, newFocus } from './solver';

if (newId === NEW_FOCUS) {
return { node: pickAutofocus(anyFocusable, innerNodes, allParentAutofocusables(entries, visibilityCache)) };
var focusNode = pickAutofocus(anyFocusable, innerNodes, allParentAutofocusables(entries, visibilityCache));
if (focusNode) {
return { node: focusNode };
}
else {
console.warn('focus-lock: cannot find any node to move focus into');
return undefined;
}
}

@@ -50,0 +57,0 @@ if (newId === undefined) {

2

dist/es2015/utils/auto-focus.d.ts
import { NodeIndex } from './tabOrder';
export declare const pickAutofocus: (nodesIndexes: NodeIndex[], orderedNodes: HTMLElement[], groups: Element[]) => HTMLElement;
export declare const pickAutofocus: (nodesIndexes: NodeIndex[], orderedNodes: HTMLElement[], groups: Element[]) => HTMLElement | undefined;

@@ -1,2 +0,2 @@

export declare const pickFirstFocus: (nodes: HTMLElement[]) => HTMLElement;
export declare const pickFirstFocus: (nodes: HTMLElement[]) => HTMLElement | undefined;
export declare const pickFocusable: (nodes: HTMLElement[], index: number) => number;

@@ -38,3 +38,10 @@ import { NEW_FOCUS, newFocus } from './solver';

if (newId === NEW_FOCUS) {
return { node: pickAutofocus(anyFocusable, innerNodes, allParentAutofocusables(entries, visibilityCache)) };
const focusNode = pickAutofocus(anyFocusable, innerNodes, allParentAutofocusables(entries, visibilityCache));
if (focusNode) {
return { node: focusNode };
}
else {
console.warn('focus-lock: cannot find any node to move focus into');
return undefined;
}
}

@@ -41,0 +48,0 @@ if (newId === undefined) {

import { NodeIndex } from './tabOrder';
export declare const pickAutofocus: (nodesIndexes: NodeIndex[], orderedNodes: HTMLElement[], groups: Element[]) => HTMLElement;
export declare const pickAutofocus: (nodesIndexes: NodeIndex[], orderedNodes: HTMLElement[], groups: Element[]) => HTMLElement | undefined;

@@ -1,2 +0,2 @@

export declare const pickFirstFocus: (nodes: HTMLElement[]) => HTMLElement;
export declare const pickFirstFocus: (nodes: HTMLElement[]) => HTMLElement | undefined;
export declare const pickFocusable: (nodes: HTMLElement[], index: number) => number;

@@ -50,3 +50,10 @@ "use strict";

if (newId === solver_1.NEW_FOCUS) {
return { node: (0, auto_focus_1.pickAutofocus)(anyFocusable, innerNodes, (0, parenting_1.allParentAutofocusables)(entries, visibilityCache)) };
var focusNode = (0, auto_focus_1.pickAutofocus)(anyFocusable, innerNodes, (0, parenting_1.allParentAutofocusables)(entries, visibilityCache));
if (focusNode) {
return { node: focusNode };
}
else {
console.warn('focus-lock: cannot find any node to move focus into');
return undefined;
}
}

@@ -53,0 +60,0 @@ if (newId === undefined) {

import { NodeIndex } from './tabOrder';
export declare const pickAutofocus: (nodesIndexes: NodeIndex[], orderedNodes: HTMLElement[], groups: Element[]) => HTMLElement;
export declare const pickAutofocus: (nodesIndexes: NodeIndex[], orderedNodes: HTMLElement[], groups: Element[]) => HTMLElement | undefined;

@@ -1,2 +0,2 @@

export declare const pickFirstFocus: (nodes: HTMLElement[]) => HTMLElement;
export declare const pickFirstFocus: (nodes: HTMLElement[]) => HTMLElement | undefined;
export declare const pickFocusable: (nodes: HTMLElement[], index: number) => number;
{
"name": "focus-lock",
"version": "0.11.3",
"version": "0.11.4",
"description": "DOM trap for a focus",

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

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc