Skip to content

Commit f067d86

Browse files
author
Artale
authored
fix: prevent Quick Tour from closing on window resize (#14)
The onClick={onClose} was on the outer fixed container, which could receive mouse events during window resize. Moved it to the backdrop div only — now only deliberate clicks on the dark overlay dismiss the tour. The inner modal panel already stops propagation. fixes #3
1 parent 0303c4a commit f067d86

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

components/onboarding-tour.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ export function OnboardingTour({ open, onClose }: { open: boolean; onClose: () =
7373
const isLast = idx === steps.length - 1
7474

7575
return (
76-
<div className="fixed inset-0 z-[90] flex items-center justify-center" onClick={onClose}>
77-
<div className="absolute inset-0 bg-black/50 backdrop-blur-sm" />
76+
<div className="fixed inset-0 z-[90] flex items-center justify-center">
77+
<div className="absolute inset-0 bg-black/50 backdrop-blur-sm" onClick={onClose} />
7878
<div
7979
className="relative w-[min(560px,92vw)] rounded-2xl border border-[var(--border)] bg-[var(--bg-elevated)] shadow-2xl overflow-hidden"
8080
onClick={(e) => e.stopPropagation()}

0 commit comments

Comments
 (0)