solid-dismiss
Advanced tools
Comparing version 1.2.1 to 1.2.3
@@ -14,3 +14,3 @@ import { isServer, insert, template, delegateEvents, addEventListener, effect, setAttribute, classList, createComponent, mergeProps } from 'solid-js/web'; | ||
if (iOS && !iOS13) { | ||
if (iOS && !iOS13 && typeof window !== "undefined") { | ||
const html = document.querySelector("html"); | ||
@@ -1551,3 +1551,3 @@ html.style.cursor = "pointer"; // @ts-ignore | ||
}; | ||
let marker = mount ? document.createTextNode("") : null; | ||
let marker = mount && !isServer ? document.createTextNode("") : null; | ||
const initDefer = !props.open(); | ||
@@ -1965,2 +1965,3 @@ let containerEl; | ||
onCleanup(() => { | ||
if (isServer) return; | ||
removeLocalEvents(state, { | ||
@@ -1967,0 +1968,0 @@ onCleanup: true |
@@ -11,3 +11,3 @@ function userAgent(pattern) { | ||
: null; | ||
if (iOS && !iOS13) { | ||
if (iOS && !iOS13 && typeof window !== "undefined") { | ||
const html = document.querySelector("html"); | ||
@@ -14,0 +14,0 @@ html.style.cursor = "pointer"; |
import "./browserInfo"; | ||
import { isServer } from "solid-js/web"; | ||
import { untrack, createEffect, onCleanup, on, createUniqueId, createMemo, createComputed, } from "solid-js"; | ||
@@ -118,3 +119,3 @@ import { hasDisplayNone, queryElement } from "./utils"; | ||
}; | ||
let marker = mount ? document.createTextNode("") : null; | ||
let marker = mount && !isServer ? document.createTextNode("") : null; | ||
const initDefer = !props.open(); | ||
@@ -483,2 +484,4 @@ let containerEl; | ||
onCleanup(() => { | ||
if (isServer) | ||
return; | ||
removeLocalEvents(state, { onCleanup: true }); | ||
@@ -485,0 +488,0 @@ removeMenuPopupEl(state); |
{ | ||
"name": "solid-dismiss", | ||
"version": "1.2.1", | ||
"version": "1.2.3", | ||
"homepage": "https://aquaductape.github.io/solid-dismiss/", | ||
@@ -29,3 +29,2 @@ "description": "Handles \"click outside\" behavior for popup menu. Closing is triggered by click/focus outside of popup element or pressing \"Escape\" key.", | ||
"main": "dist/esm/index.js", | ||
"module": "dist/esm/index.js", | ||
"types": "dist/types/index.d.ts", | ||
@@ -32,0 +31,0 @@ "exports": { |
Sorry, the diff of this file is not supported yet
296629
3998