website: Fix popup not collapsing after demo walkthrough completes

Remove firstTake && !demoFinishedByStory guard from takeOver handler
so clicks outside the extension mockup always collapse the popup,
regardless of whether the automated walkthrough finished.
This commit is contained in:
KoalaDev
2026-07-03 12:43:59 +02:00
parent c5c140d31c
commit 2d94cc10e4
+2 -3
View File
@@ -784,9 +784,8 @@ document.addEventListener('DOMContentLoaded', () => {
const firstTake = !userTookOver;
userTookOver = true;
finishDemo();
// if the story left the popup open and the user clicked elsewhere,
// tuck it away; clicks inside the popup (or on its icon) keep it
if (firstTake && !demoFinishedByStory && e && e.target &&
// Clicks outside the popup (and not on its launcher icon) always collapse the popup
if (e && e.target &&
!e.target.closest('.extension-mockup') &&
!e.target.closest('.demo-ext-launcher')) {
setPopupOpen(false);