From 7e81540d2ed2ae461e1447d35810ce8dfc84057d Mon Sep 17 00:00:00 2001 From: Jannis Klose <69921578+janni1288@users.noreply.github.com> Date: Wed, 17 Sep 2025 21:27:26 +0200 Subject: [PATCH] fix(curriculum): make Theme Switcher click events bubble (#62234) --- .../blocks/lab-theme-switcher/687ad7be1ff45032ccf1d92f.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/curriculum/challenges/english/blocks/lab-theme-switcher/687ad7be1ff45032ccf1d92f.md b/curriculum/challenges/english/blocks/lab-theme-switcher/687ad7be1ff45032ccf1d92f.md index 303f48fc47c..58509240860 100644 --- a/curriculum/challenges/english/blocks/lab-theme-switcher/687ad7be1ff45032ccf1d92f.md +++ b/curriculum/challenges/english/blocks/lab-theme-switcher/687ad7be1ff45032ccf1d92f.md @@ -274,7 +274,7 @@ const listItems = document.querySelectorAll("#theme-dropdown li"); themeDropdownBtn.dispatchEvent(new Event("click")); const clickedItem = listItems[1]; -clickedItem?.dispatchEvent(new Event("click")); +clickedItem?.dispatchEvent(new Event("click"), {bubbles: true}); const expectedClass = clickedItem?.id; const actualClass = document.body.className; @@ -291,7 +291,7 @@ const themeDropdownBtn = document.getElementById("theme-switcher-button"); const listItems = document.querySelectorAll("ul li"); themeDropdownBtn?.dispatchEvent(new Event("click")); -listItems[1]?.dispatchEvent(new Event("click")); +listItems[1]?.dispatchEvent(new Event("click"), {bubbles: true}); const selectedThemeName = listItems[1]?.textContent.toLowerCase().trim(); const selectedTheme = themes?.find(theme => theme.name === selectedThemeName);