Mobile: per-host status line forces horizontal page scroll at 320px #42
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found by the responsive-layout harness added for #13
(
make frontend-viewport-test). This is a real defect in the layout, not aharness artifact.
Symptom
At a 320px viewport the page scrolls horizontally:
documentElement.scrollWidthis 350 against a 320px layout viewport. Reproduced at every run, only at 320px —
667, 767, 768, 769, 844 and 1280 are clean.
Cause
.status-textinhostRowHTML()(src/main.js) carrieswhitespace-nowrap,and once a tick has populated it the content reads e.g.
min 167ms / med 167ms / avg 167ms / max 167ms. Measured at 320px that is 325pxof unbreakable text inside a 270px box, and since the element does not clip, the
overflow propagates all the way up to the document:
The
max-width: 768pxblock insrc/styles.csssets the info block towidth: 100%but never addresses this line, so the narrow layout inherits anowrap string sized for the 420px desktop column.
Suggested fix
Allow the status line to wrap (or shorten it) below the breakpoint. Any fix is
fine as long as
make frontend-viewport-testreportsno-horizontal-overflowpassing at 320x568 — the harness already asserts this and names the offending
element on failure.
Note for whoever picks this up
window.innerWidthis useless for detecting this. Under mobile emulation Chromelets
innerWidthgrow to the width of the overflowing content — it reports 350,matching the overflow exactly, so a check written as
scrollWidth <= innerWidthpasses while the page is visibly broken. Theharness compares against
Math.min(innerWidth, documentElement.clientWidth)instead.
Ref #13, #5, #2