fix(js): animate-on-scroll threshold 0.1 ? 0 (mobile cgv + politique invisible bug) #7

Merged
serge merged 1 commits from fix/animate-on-scroll-threshold-mobile into main 2026-05-07 16:37:40 +03:00
Owner

Companion to PR #6. Fixes invisible content on mobile cgv.html + politique-confidentialite.html (= tall .animate-on-scroll blocks never reach 10% intersection ratio on mobile viewport).

Companion to PR #6. Fixes invisible content on mobile cgv.html + politique-confidentialite.html (= tall .animate-on-scroll blocks never reach 10% intersection ratio on mobile viewport).
serge added 1 commit 2026-05-07 16:37:37 +03:00
Bug: on mobile portrait, content of cgv.html and
politique-confidentialite.html stays invisible because the
.animate-on-scroll blocks (data-lang-block FR/EN/MG trilingual
content) are 2000-3000px tall and the viewport (~600px) never
reaches the 10% intersection ratio required to trigger the
.visible class.

Symptom: page appears empty on mobile until user resizes the
window (= triggers re-evaluation). Reported by Serge during
post-cutover E2E retest 2026-05-07.

Other pages (mentions-legales, accueil, etc.) unaffected because
their .animate-on-scroll blocks are short enough to satisfy the
previous 10% threshold.

Fix: threshold: 0 fires as soon as any pixel of the element
enters the viewport. rootMargin -50px bottom kept to give a small
buffer before triggering animation.

Refs: post-cutover polish (companion to PR #6 chore polish).
serge merged commit db43583a62 into main 2026-05-07 16:37:40 +03:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: serge/site-mva-global-fret#7
No description provided.