From b06fa33e314ce2621e5f58e135525535201f5e0f Mon Sep 17 00:00:00 2001 From: Steve McConnel Date: Wed, 20 Nov 2024 11:41:12 -0700 Subject: [PATCH] fix: Prevent showing game answers when sliding pages (BL-14064) --- src/dragActivityRuntime.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/dragActivityRuntime.ts b/src/dragActivityRuntime.ts index 6ca4b16..14479aa 100644 --- a/src/dragActivityRuntime.ts +++ b/src/dragActivityRuntime.ts @@ -293,7 +293,8 @@ export function undoPrepareActivity(page: HTMLElement) { ).forEach((elt: HTMLElement) => { elt.parentElement?.removeChild(elt); }); - doShowAnswersInTargets(true, page); + const inPlayer = page.closest(".swiper-slide") !== null; + doShowAnswersInTargets(!inPlayer, page); //Slider: setSlideablesVisibility(page, true); // Array.from(page.getElementsByTagName("img")).forEach((img: HTMLElement) => { // img.removeEventListener("click", clickSliderImage);