solid-dismiss
Advanced tools
Comparing version 1.5.5 to 1.5.6
@@ -89,5 +89,5 @@ import { untrack, createComputed, createSignal, children, batch, } from "solid-js"; | ||
batch(() => { | ||
const _el = isPortal ? portalMarker : el; | ||
s1() !== _el && set1(_el); | ||
s2() === _el && set2(undefined); | ||
const el_ = isPortal ? portalMarker : _el; | ||
s1() !== el_ && set1(el_); | ||
s2() === el_ && set2(undefined); | ||
}); | ||
@@ -101,3 +101,3 @@ onAfterEnter && onAfterEnter(el); | ||
if (type === "content") { | ||
const el_ = isPortal ? portalMarker : el; | ||
const el_ = isPortal ? portalMarker : _el; | ||
prev && !props.mode ? set2(el_) : set1(el_); | ||
@@ -134,5 +134,7 @@ } | ||
prev.removeEventListener("animationend", endTransition); | ||
prev.classList.remove(...exitActiveClasses); | ||
prev.classList.remove(...exitToClasses); | ||
if (type === "content") { | ||
prev.classList.remove(...exitActiveClasses); | ||
prev.classList.remove(...exitToClasses); | ||
} | ||
if (type === "content") { | ||
if (isPortal) { | ||
@@ -139,0 +141,0 @@ // @ts-ignore |
@@ -32,14 +32,4 @@ import { dismissStack } from "../global/dismissStack"; | ||
} | ||
// removeOnBlurTargetMenuButton(state, menuBtnEl); | ||
setOpen(!open()); | ||
}; | ||
/** | ||
* for animation perf, to reduce potential jank, by not checking if menuButton is visible or not | ||
*/ | ||
const removeOnBlurTargetMenuButton = (state, el) => { | ||
if (state.focusElementOnOpen && | ||
state.menuBtnEls?.every((el) => el !== state.focusElementOnOpen)) { | ||
el.removeEventListener("blur", state.onBlurMenuButtonRef); | ||
} | ||
}; | ||
export const onBlurMenuButton = (state, e) => { | ||
@@ -46,0 +36,0 @@ const { containerEl, focusedMenuBtn, overlay, setOpen, timeouts, menuBtnMouseDownFired, closeWhenDocumentBlurs, } = state; |
{ | ||
"name": "solid-dismiss", | ||
"version": "1.5.5", | ||
"version": "1.5.6", | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
341725
4624