Huge News!Announcing our $40M Series B led by Abstract Ventures.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.6.1 to 1.6.2

12

dist/source/local/container.js

@@ -7,3 +7,3 @@ import { dismissStack } from "../global/dismissStack";

export const onFocusOutContainer = (state, e) => {
const { overlayElement, trapFocus, timeouts, closeWhenDocumentBlurs, mountedPopupsSafeList, uniqueId, } = state;
const { overlayElement, trapFocus, timeouts, closeWhenDocumentBlurs, mountedPopupsSafeList, } = state;
timeoutFocusOutFired = false;

@@ -21,3 +21,3 @@ if (globalState.thirdPartyPopupEl) {

return;
console.log("container focusout", uniqueId);
const dismissStackLength = dismissStack.length;
setTimeoutFocusOut(timeouts, () => {

@@ -30,2 +30,6 @@ if (mountedPopupsSafeList) {

}
// fixes issue where race condition of new item mounts before timeout focusout fires
// therefore focused item which is menuButton, the new container doesn't contain, so removes stack
if (dismissStackLength < dismissStack.length)
return;
globalState.closedByEvents = true;

@@ -35,3 +39,2 @@ checkThenClose(dismissStack, (item) => {

const clickTarget = globalState.clickTarget;
console.log({ clickTarget }, uniqueId);
if (clickTarget && containerEl.contains(clickTarget)) {

@@ -51,4 +54,3 @@ return { continue: false };

export const onFocusInContainer = (state, e) => {
const { uniqueId, timeouts } = state;
console.log("container focusin", uniqueId);
const { timeouts } = state;
clearTimeout(timeouts.containerFocusTimeoutId);

@@ -55,0 +57,0 @@ clearTimeout(timeouts.menuButtonBlurTimeoutId);

{
"name": "solid-dismiss",
"version": "1.6.1",
"version": "1.6.2",
"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 too big to display

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