From 584b83b99b3608549295a26cb435db2faf6b4ae0 Mon Sep 17 00:00:00 2001 From: Maaxxs <61059039+MaaxxsDev@users.noreply.github.com> Date: Sat, 26 Sep 2026 22:18:30 +0200 Subject: [PATCH] Tour: the last card stays in the middle on phones instead of slipping off to the top left Reported in Discord: "Das letzte Fenster switcht nach oben links, sodass es nicht komplett lesbar ist". The steps without a target (welcome and "Das war's!") are centered. On phones the step before ("Fehler gefunden?") docks the card to the top edge, and place() added "centered" without removing "docked"/"docked-top". Their left/top rules (declared later, also !important) won over the centering while translate(-50%, -50%) stayed, so the card sat half outside the screen at the top left. The same happened when going back from step 2 to the welcome step. place() now drops both classes first. Co-Authored-By: Claude Opus 5.5 --- assets/js/tour.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/assets/js/tour.js b/assets/js/tour.js index 3008ea5..d1e3b1d 100644 --- a/assets/js/tour.js +++ b/assets/js/tour.js @@ -86,6 +86,9 @@ if (!current) { spotlight.classList.remove('visible'); backdrop.classList.add('dim'); + // Vom vorigen Schritt kann die Karte auf dem Handy noch angedockt sein - dessen + // left/top-Regeln stechen die Mitte aus und schieben die Karte nach oben links. + card.classList.remove('docked', 'docked-top'); card.classList.add('centered'); card.style.left = ''; card.style.top = '';