Skip to content

Stop a scaled mobile preview from clipping at 208px - #1523

Open
sloemo01 wants to merge 1 commit into
responsively-org:mainfrom
sloemo01:fix/mobile-preview-cutoff-whitespace
Open

sloemo01 wants to merge 1 commit into
responsively-org:mainfrom
sloemo01:fix/mobile-preview-cutoff-whitespace

Conversation

@sloemo01

@sloemo01 sloemo01 commented Jul 25, 2026 •

Copy link
Copy Markdown

Fixes #1515

Summary of Changes:

  • The restricted-size wrapper pinned the frame to a fixed w-52 (208px), so a mobile preview scaled wider than that lost its right edge. DeviceFrame.tsx now sets minWidth: max(scaledWidth, 208) so the frame keeps the 208px floor while the preview keeps its full width.
  • The scrollbar CSS injected for mobile devices in useWebviewLifecycle.ts now zeroes the scrollbar boxes instead of only hiding them, so the layout viewport no longer shifts and makes the clipping worse.

Ported onto the 2.0 previewer rewrite: the window-open IPC half of the original branch no longer exists on main, so it is left out.

The restricted-size wrapper pinned the frame to a fixed 208px (w-52),
so a mobile preview scaled wider than that lost its right edge. Use
minWidth of max(scaledWidth, 208) so the frame keeps the 208px floor
while the preview keeps its full width.

The scrollbar CSS injected on mobile devices now zeroes the scrollbar
boxes rather than only hiding them; the leftover space shifted the
layout viewport and made the clipping worse.

Fixes responsively-org#1515.
@sloemo01
sloemo01 force-pushed the fix/mobile-preview-cutoff-whitespace branch from a7bd6fb to f83db9e Compare October 12, 2026 16:51
@sloemo01 sloemo01 changed the title Fix/mobile preview cutoff whitespace Stop a scaled mobile preview from clipping at 208px Oct 12, 2026
@sloemo01

Copy link
Copy Markdown
Author

Hi @manojVivek, this is up to date with main and CI is green. Would you have a chance to review it when you get a moment? Thanks!

This branch has not been deployed

No deployments
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.

Mobile preview cuts off white space on the right end of space since latest version

1 participant