Skip to content

Fix horizontal scroll on iPhone: let form controls shrink in grid/flex cells - #10

Merged
zxpower merged 1 commit into
mainfrom
more_interface_fixes
Nov 16, 2026
Merged

zxpower merged 1 commit into
mainfrom
more_interface_fixes

Conversation

@zxpower

@zxpower zxpower commented Nov 16, 2026

Copy link
Copy Markdown
Owner

Problem

On iPhone the page still scrolled sideways, with the right side cropped. iOS Safari sizes native <select> and number <input> controls to fit their content (a dropdown is as wide as its longest option, e.g. ".308 Win / 7.62×51 NATO — .308″"). Grid and flex columns default to min-width: auto, so they stretched to fit the control and pushed the card past the screen edge. Chromium and Linux WebKit don't size controls this way, so it didn't show up in desktop testing.

Fix

  • input, select { min-width: 0; max-width: 100%; }
  • .grid2/.grid3/.row/.gear-grid/.trow children get min-width: 0, so columns shrink to their share of the card.
  • select { text-overflow: ellipsis; }: long options are cut off with "…" in the closed dropdown; the full text still shows when opened.

Verified

WebKit (Playwright) with iOS-like control sizes at 393px (iPhone 15 Pro): before the fix the caliber dropdown pushed the barrel-twist field to 390px, past the card's inner edge at about 363px. After the fix nothing overflows on any tab. node test.js: 70 passed.

@zxpower zxpower self-assigned this Nov 16, 2026
@zxpower
zxpower merged commit 8dd98d7 into main Nov 16, 2026
2 checks passed
@zxpower
zxpower deleted the more_interface_fixes branch November 16, 2026 10:17
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