New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

solid-dismiss

Package Overview
Dependencies
Maintainers
1
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

solid-dismiss - npm Package Compare versions

Comparing version 1.0.14 to 1.0.15

11

dist/esm/index.js

@@ -882,6 +882,7 @@ import { insert, template, delegateEvents, addEventListener, effect, setAttribute, classList, createComponent, mergeProps } from 'solid-js/web';

menuPopupEl,
containerEl
containerEl,
focusSentinelBeforeEl
} = dismissStack[dismissStack.length - 1];
const menuBtnEl = getMenuButton(menuBtnEls);
const activeElement = document.activeElement;
let activeElement = document.activeElement;
let direction;

@@ -895,4 +896,5 @@

if (activeElement === menuBtnEl || activeElement === menuPopupEl) {
if (activeElement === menuBtnEl || activeElement === menuPopupEl || activeElement === containerEl) {
direction = "forwards";
activeElement = focusSentinelBeforeEl;
}

@@ -903,3 +905,3 @@

direction,
stopAtElement: containerEl
stopAtElement: menuPopupEl
});

@@ -1864,2 +1866,3 @@

focusElementOnClose,
focusSentinelBeforeEl: state.focusSentinelBeforeEl,
upperStackRemovedByFocusOut: false,

@@ -1866,0 +1869,0 @@ detectIfMenuButtonObscured: false,

@@ -188,5 +188,5 @@ import { dismissStack } from "./dismissStack";

return;
const { menuBtnEls, menuPopupEl, containerEl } = dismissStack[dismissStack.length - 1];
const { menuBtnEls, menuPopupEl, containerEl, focusSentinelBeforeEl } = dismissStack[dismissStack.length - 1];
const menuBtnEl = getMenuButton(menuBtnEls);
const activeElement = document.activeElement;
let activeElement = document.activeElement;
let direction;

@@ -199,4 +199,7 @@ if (e.key === "ArrowDown") {

}
if (activeElement === menuBtnEl || activeElement === menuPopupEl) {
if (activeElement === menuBtnEl ||
activeElement === menuPopupEl ||
activeElement === containerEl) {
direction = "forwards";
activeElement = focusSentinelBeforeEl;
}

@@ -206,3 +209,3 @@ const el = getNextTabbableElement({

direction,
stopAtElement: containerEl,
stopAtElement: menuPopupEl,
});

@@ -209,0 +212,0 @@ if (el) {

@@ -413,2 +413,3 @@ import "./browserInfo";

focusElementOnClose,
focusSentinelBeforeEl: state.focusSentinelBeforeEl,
upperStackRemovedByFocusOut: false,

@@ -415,0 +416,0 @@ detectIfMenuButtonObscured: false,

import { TDismiss } from "..";
import { TLocalState } from "../local/localState";
export declare type TDismissStack = Pick<TDismiss, "focusElementOnClose" | "overlayElement" | "open" | "setOpen"> & Pick<TLocalState, "timeouts" | "uniqueId" | "cursorKeys" | "closeWhenDocumentBlurs" | "closeWhenMenuButtonIsTabbed" | "closeWhenEscapeKeyIsPressed" | "upperStackRemovedByFocusOut" | "menuPopupEl" | "overlayEl" | "overlay"> & {
export declare type TDismissStack = Pick<TDismiss, "focusElementOnClose" | "overlayElement" | "open" | "setOpen"> & Pick<TLocalState, "timeouts" | "uniqueId" | "cursorKeys" | "closeWhenDocumentBlurs" | "closeWhenMenuButtonIsTabbed" | "closeWhenEscapeKeyIsPressed" | "upperStackRemovedByFocusOut" | "menuPopupEl" | "overlayEl" | "overlay" | "focusSentinelBeforeEl"> & {
id: string;

@@ -5,0 +5,0 @@ menuBtnEls: HTMLElement[];

{
"name": "solid-dismiss",
"version": "1.0.14",
"version": "1.0.15",
"homepage": "https://aquaductape.github.io/solid-dismiss/",

@@ -5,0 +5,0 @@ "description": "Handles \"click outside\" behavior for popup menu. Closing is triggered by click/focus outside of popup element or pressing \"Escape\" key.",

Sorry, the diff of this file is not supported yet

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