fix(play): show quiz_carry embed question during 3-2-1 countdown strip

- syncQuizCarryEmbedQuestionStrip uses pending question while blocking
- z-index class above countdown overlay; sync after tick/pickNext
- cache bust play.js v=0.089

Made-with: Cursor
This commit is contained in:
2026-04-24 14:55:44 +00:00
parent 9f4a6fe424
commit cbec7894d8
2 changed files with 22 additions and 3 deletions
+16 -2
View File
@@ -755,16 +755,27 @@
const p = document.getElementById('quiz-carry-embed-q-strip-text');
if (!wrap || !p) return;
if (!(previewMode && editorEmbedReturn && isQuizCarry())) {
wrap.classList.remove('quiz-carry-embed-q-strip--countdown');
wrap.classList.add('is-hidden');
wrap.setAttribute('aria-hidden', 'true');
return;
}
if (isQuizCarryEmbedCountdownBlockingMovement()) {
const blocking = isQuizCarryEmbedCountdownBlockingMovement();
const pending = quizCarryEmbedPendingQuestion;
let t = '';
if (blocking && pending) {
t = formatQuizCarryQuestionHud(pending);
if (t) wrap.classList.add('quiz-carry-embed-q-strip--countdown');
else wrap.classList.remove('quiz-carry-embed-q-strip--countdown');
} else if (blocking) {
wrap.classList.remove('quiz-carry-embed-q-strip--countdown');
wrap.classList.add('is-hidden');
wrap.setAttribute('aria-hidden', 'true');
return;
} else {
wrap.classList.remove('quiz-carry-embed-q-strip--countdown');
t = (playQuizText || '').trim();
}
const t = (playQuizText || '').trim();
if (!t) {
wrap.classList.add('is-hidden');
wrap.setAttribute('aria-hidden', 'true');
@@ -1893,6 +1904,7 @@
if (!o) return;
o.botQuizCarryPathfindAfter = 0;
});
syncQuizCarryEmbedQuestionStrip();
return;
}
const elapsed = now - quizCarryEmbedCountdownStartAt;
@@ -1902,6 +1914,7 @@
ov.classList.remove('is-hidden');
ov.setAttribute('aria-hidden', 'false');
}
syncQuizCarryEmbedQuestionStrip();
}
function quizCarryPickNextQuestion() {
@@ -1938,6 +1951,7 @@
const phaseEl = document.getElementById('quiz-game-phase-label');
if (phaseEl) phaseEl.textContent = 'รอเริ่มคำถาม — นับถอยหลัง 3 · 2 · 1';
tickQuizCarryEmbedCountdown();
syncQuizCarryEmbedQuestionStrip();
return;
}
quizCarryCurrent = q;
+6 -1
View File
@@ -145,6 +145,11 @@
max-height: 22vh;
overflow: auto;
}
/* อยู่เหนือ overlay นับถอยหลัง (10080) เพื่อให้อ่านคำถามระหว่าง 3–2–1 */
#quiz-carry-embed-q-strip.quiz-carry-embed-q-strip--countdown {
z-index: 10082;
bottom: max(14px, calc(env(safe-area-inset-bottom) + 8px));
}
#play-quiz-scoreboard {
position: fixed;
top: max(56px, env(safe-area-inset-top));
@@ -719,7 +724,7 @@
</div>
<script src="/Game/socket.io/socket.io.js"></script>
<script src="js/version.js?v=0.0166"></script>
<script src="js/play.js?v=0.088"></script>
<script src="js/play.js?v=0.089"></script>
<div class="version-tag">v —</div>
</body>
</html>