Skip to content

Fix landscape rotation lock by using CSS media query instead of JS#28

Merged
scottlu merged 1 commit intomasterfrom
claude/lock-screen-rotation-home-UCThh
Mar 31, 2026
Merged

Fix landscape rotation lock by using CSS media query instead of JS#28
scottlu merged 1 commit intomasterfrom
claude/lock-screen-rotation-home-UCThh

Conversation

@scottlu
Copy link
Copy Markdown
Owner

@scottlu scottlu commented Mar 31, 2026

The JS-based rotation used window.innerWidth/Height in a useMemo which
could have stale values during orientation transitions. CSS viewport
units (100dvh/100dvw) are always in sync with the actual viewport,
making the portrait lock more reliable on iOS PWAs.

https://claude.ai/code/session_01DuB7jf8ub1kEPADXS4Uory

The JS-based rotation used window.innerWidth/Height in a useMemo which
could have stale values during orientation transitions. CSS viewport
units (100dvh/100dvw) are always in sync with the actual viewport,
making the portrait lock more reliable on iOS PWAs.

https://claude.ai/code/session_01DuB7jf8ub1kEPADXS4Uory
@scottlu scottlu merged commit 3be85c7 into master Mar 31, 2026
@scottlu scottlu deleted the claude/lock-screen-rotation-home-UCThh branch March 31, 2026 04:25
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