Skip to content

Recover Chrome iPad viewport width after fullscreen playback - #14

Merged
agent-pushpinderbal merged 2 commits into
mainfrom
fix/ipad-chrome-viewport-width
Oct 22, 2026
Merged

agent-pushpinderbal merged 2 commits into
mainfrom
fix/ipad-chrome-viewport-width

Conversation

@agent-pushpinderbal

@agent-pushpinderbal agent-pushpinderbal commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Chrome 156.0.8078.46 on iPadOS 27.0.1 can leave the page at portrait width after fullscreen playback: the affected device reported outerWidth=1180, innerWidth=820, clientWidth=820, zoom 1, and a stale portrait screen orientation. The previous workaround reused the stale width and restored device-width, so it did not recover the layout. Applying width=1180, initial-scale=1 on that iPad restored the full-width layout and disabled the mobile breakpoint.

Replace the 132-line workaround with a 64-line recovery limited to Chrome on iOS. Use the actual outer window width when it differs from the page viewport, keep the explicit width synchronized with later window changes, and handle WebKit fitting the previous width when returning to portrait. Defer changes while fullscreen or pinch-zoomed, preserve the viewport's existing options, and remove the player-specific recovery events and unmount hooks. Other browsers do not initialize this recovery.

Replace tests that only asserted viewport-tag mutations with a workflow that recreates the measured outer/page width mismatch and checks the rendered navigation, page width, retained video/session, Search query, and subsequent portrait layout. Chromium exercises the real element-fullscreen controls and a simulated native exit; WebKit exercises the simulated native exit.

Preserve Search's browsing position when playback ends: skip grid measurement while Search is hidden, since the unresolved repeat(...) value was incorrectly counted as three columns, and defer scroll restoration until Motion has applied its final automatic height. These address failures caught by the existing deep-scroll workflow.

Validation:

  • Frontend TypeScript/Vite build passed.
  • The new recovery workflow fails against the previous release (699eb73): the desktop navigation remains hidden after fullscreen exit.
  • Relevant Chromium and WebKit playback, navigation, rotation, and scroll-return workflows passed; the mobile scroll-return case was repeated under concurrency after its timing fix.
  • The corrective viewport width was verified on the affected physical iPad using a temporary bookmarklet. Automatic fullscreen-exit recovery still needs confirmation there after deployment.

@agent-pushpinderbal
agent-pushpinderbal merged commit 215cb01 into main Oct 22, 2026
2 checks passed
@agent-pushpinderbal
agent-pushpinderbal deleted the fix/ipad-chrome-viewport-width branch October 22, 2026 01:06
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.

1 participant