Skip to content

fix: suppress mobile sidebar slide animation on initial page load - #2

Open
pakcli wants to merge 1 commit into
quartz-community:mainfrom
pakcli:main
Open

fix: suppress mobile sidebar slide animation on initial page load#2
pakcli wants to merge 1 commit into
quartz-community:mainfrom
pakcli:main

Conversation

@pakcli

@pakcli pakcli commented May 4, 2026

Copy link
Copy Markdown

on mobile, the explorer sidebar would play a slide-out animation
when the page first loaded because the collapsed class was being
added to .explorer-content after the transition was already active.

fix by temporarily setting transition: none on .explorer-content
before adding the collapsed class, then restoring the transition
after two animation frames (double rAF) to ensure the browser has
painted before re-enabling it.

  • no animation on load → sidebar snaps to collapsed immediately
  • toggle animation still works normally after load

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants