Pictures and scrollbar flashing repeatedly on product page at knixteen.ca
Categories
(Web Compatibility :: Site Reports, defect, P1)
Tracking
(Webcompat Priority:P3, Webcompat Score:1, firefox-esr115 wontfix, firefox-esr140 wontfix, firefox152 wontfix, firefox153 wontfix, firefox154 fix-optional, firefox163 affected)
People
(Reporter: cso, Assigned: twisniewski)
References
(Depends on 1 open bug, Regression, )
Details
(6 keywords, Whiteboard: [autowebcompat:processed][autowebcompat:repro-success])
User Story
autowebcompat-repro-status:success autowebcompat-repro-chrome-mask-fixed:false autowebcompat-repro-channels:nightly,stable,esr autowebcompat-diagnosis-status:success platform:windows,mac,linux impact:site-broken configuration:general affects:all branch:release user-impact-score:10 autowebcompat-intervention-status:success
Attachments
(2 files, 2 external files)
When a product's page is opened, the scrollbar and the pictures keep flashing.
Firefox Nightly 154.0a1 (2026-07-05) (aarch64)
MacOS Taboe 26.5.1
URL: https://www.knixteen.ca/products/period-swim-square-neck-one-piece?variant=51874765668638
Recording: https://drive.google.com/drive/folders/1VW3GROZuIp1HEs8c9NOoBejzWX3aGm-S?usp=sharing
Comment 1•4 months ago
|
||
Regression window:
https://hg-edge.mozilla.org/integration/autoland/pushloghtml?fromchange=dd1478ff8ec707a86be483d2e89b0afa30215d56&tochange=59770e5a8ff238b1e20aa2d3aa4827cd65a67e63
Updated•4 months ago
|
Comment 2•4 months ago
|
||
Set release status flags based on info from the regressing bug 1760658
:boris, since you are the author of the regressor, bug 1760658, could you take a look? Also, could you set the severity field?
For more information, please visit BugBot documentation.
Updated•4 months ago
|
Updated•4 months ago
|
Comment 3•4 months ago
|
||
Ok, that looks.. pretty bad. I'd go as far to say it renders the site unusable -> S2.
There's JS involvement, so it's a bit tricky to try and reduce this, unfortunately...
Comment 4•4 months ago
•
|
||
Looking at the DOM, I see a few clues:
- The broken part of the page has swiper class names, like
class="swiper-slide swiper-slide-active"andclass="swiper-slide swiper-slide-next" - These
swiper-slideelements have their heights repeatedly set by JS, seemingly in a loop.
Both of those factors seem very similar to bug 2033758 - that's another bug with a swiper-flavored carousel, with constantly-changing height values. Bug 2033758 comment 8 has some analysis - in that case at least, it's due a "back-and-forth battle" that happens to stabilize in Chrome but not in Firefox.
Updated•4 months ago
|
Comment 5•4 months ago
•
|
||
bug 2033758 is about ResizeObserver going haywire, and I think that's roughly what's happening here as well.
At least: if I set an attribute-modification-breakpoint (on one of the elements whose height is being rapidly modified) in our JS debugger, and go up the backtrace, I can see this at one of the levels (indicating that a ResizeObserver callback is involved in the neverending modifications here):
n=new ResizeObserver(u=>{a=r.requestAnimationFrame(...
It's a bit hard to learn more from the JS debugger, because the site uses a bundle file with heavily-minified JS, and bug 1859815 blocks us from prettifying that (which is kinda necessary to usefully single-step / place breakpoints / etc.)
Updated•3 months ago
|
Updated•3 months ago
|
Updated•3 months ago
|
Comment 6•3 months ago
|
||
Confirmed genuine Firefox web-compat issue. On the reported knixteen.ca product page, the "swiper" product image carousel enters a runaway resize feedback loop in Firefox that never converges, which is what the reporter sees as the pictures and scrollbar flashing repeatedly.
Firefox (headless Nightly, 1366x677): the inline height of the .swiper-slide elements changes on every animation frame, cycling through 2527px -> 10140px -> 40592px -> 162400px -> 649632px -> 2598560px -> 10394300px -> 17895700px and back. This propagates to the whole document: sampling document.body.scrollHeight over 60 consecutive animation frames yields 8 distinct values ranging from 7,052px to 17,895,698px. The layout never settles, so the carousel images and the page scrollbar continuously flash. The page-height oscillation to ~17.9 million pixels also explains the scrollbar thrashing specifically.
Chrome (stable, same 1366x677 viewport, same URL and steps): completely stable. The same 60-frame sample returns a single value of 5,969px, with a maximum slide inline height of 664px. No flashing, no oscillation. So the issue does not reproduce in Chrome.
A Puppeteer confirmation script was written to /app/repro/reproduction=p_8vw_3c.mjs. It drives the real reported site in both browsers and verifies the expected behaviour positively (the page height settles to one stable, sane value under 100,000px with the carousel present). Results were fully deterministic across 3 runs each: Firefox 0/3 working -> exit code 1; Chrome 3/3 working -> exit code 0. This matches the required difference exactly.
No screenshot is attached: although the breakage is visual, it is temporal (per-frame layout oscillation / flashing) rather than a static layout error. Any single captured frame of this page looks normal, so a still image would not demonstrate the issue; the per-frame measurements and the script serve as the evidence instead.
This is consistent with the report's own analysis and with the cited bug 2033758 — a ResizeObserver-driven "back-and-forth battle" over element heights that happens to stabilise in Chrome but not in Firefox. Given the carousel and scrollbar flash constantly, the page is effectively unusable in Firefox.
Updated•3 months ago
|
Updated•3 months ago
|
Comment 7•3 months ago
|
||
Root cause analysis generated by autowebcompat bot:
Engine layout difference: whether the content-based automatic minimum size for boxes with a preferred aspect ratio is applied to a box whose specified height is a percentage that resolves against an indefinite containing block (i.e. behaves as auto).
The product page's carousel is Swiper. Swiper's stylesheet gives .swiper-wrapper { display:flex; width:100%; height:100%; box-sizing:content-box }, .swiper-vertical > .swiper-wrapper { flex-direction:column }, and the theme adds Tailwind's lg:aspect-[0.77] → aspect-ratio: .77 on that same wrapper. Its parent .swiper has height:auto, so the wrapper's height:100% is indefinite and the block size comes from the aspect ratio (511px wide ⇒ 663.6px tall). The wrapper's content (4 slides, each sized by Swiper to the container height) is much taller than that, and min-height is unset (auto).
- Chrome: the specified preferred size is
100%, notauto, so the aspect-ratio automatic minimum size (CSS Sizing 4 §4.1) is not applied. The wrapper stays pinned at the ratio-derived 663.6px and the slides simply overflow (clipped by.swiper { overflow:hidden }). - Firefox: treats the indefinite
height:100%asautofor that purpose and applies the content-based automatic minimum size, somin-height:autoresolves to the wrapper's min-content height (sum of the slide heights) and the wrapper grows to fit its content.
That turns Swiper's sizing code into a positive feedback loop. Swiper observes the carousel with a ResizeObserver and, in a requestAnimationFrame, writes the measured container height back onto each .swiper-slide as an inline height. In Chrome read-value == write-value, so it converges after one tick. In Firefox each write makes the content (4 stacked slides) ~4× taller, which raises the wrapper's automatic minimum size, which the next ResizeObserver tick reads back — heights quadruple every frame (2527 → 10140 → 40592 → 162400 → 649632 → 2598560 → 10394300 → ~17,895,698px, Firefox's max layout size) and then collapse and restart. That endless relayout is what the reporter sees as the images and the page scrollbar flashing.
Spec references:
- Automatic content-based minimum size for aspect-ratio boxes: https://drafts.csswg.org/css-sizing-4/#aspect-ratio-minimum
aspect-ratio/ ratio-dependent axis: https://drafts.csswg.org/css-sizing-4/#aspect-ratio- Indefinite percentages behaving as
auto: https://drafts.csswg.org/css-sizing-3/#percentage-sizing
(The spec condition is phrased on the computed preferred size beingauto; the disagreement is over an indefinite percentage, so this is arguably an under-specified corner rather than a clear violation by either engine.)
Evidence:
Live site (1366×677, both browsers, ~5s after load), sampling document.body.scrollHeight over 30 rAFs:
- Chrome: 1 distinct value (5969). Firefox: 8 distinct values, 7052 … 17,895,698.
- The changing elements are the 4
.swiper-slidechildren ofdiv.swiper-wrapper.pb-4.lg:aspect-[0.77]; their inlineheightquadruples each frame (observed 649632px → 2598560px in two consecutive rAFs). - Same wrapper element, computed style:
aspect-ratio: 0.77/1,flex-direction: column,overflow: visible, no author min-height, width 511px.- Chrome:
offsetHeight= 664 ( = 511/0.77, the ratio-derived height),scrollHeight= 2680 → content overflows, height stays pinned. - Firefox:
offsetHeight= 649632 = exactly the sum of its 4 slides (4×162400 + margins) → the wrapper grows to its content.
- Chrome:
- Chrome probe on the live wrapper: forcing
height:auto !important→ offsetHeight jumps 664 → 2688 (content min then applies); forcingmin-height:0→ stays 664. So in Chrome the only thing suppressing the content-based minimum is the specifiedheight:100%. - Source confirmation from the theme CSS (https://www.knixteen.ca/cdn/shop/t/76/assets/theme.css):
.swiper-wrapper{box-sizing:content-box;display:flex;height:100%;...;width:100%;z-index:1}and.swiper-wrapper{flex-direction:column}.
Reduced testcase /app/diagnosis/testcase=yv3_4_z4.html (loaded in both browsers via DevTools):
- v1
aspect-ratio:.5+height:auto, 900px content → 900 in BOTH (control: min applies). - v2 same +
height:100%with an auto-height parent → Chrome 400, Firefox 900 ← the divergence. - v3 v2 +
min-height:0→ 400 in BOTH (control: it is the automatic minimum size). - v5 v2 but parent
height:300px(definite %) → 300 in BOTH (control). - loop box (v2 geometry + ResizeObserver writing the container height onto 4 "slides", capped at 12 ticks): Chrome 1 distinct value, stays 400; Firefox 9 distinct values — 400, 1600, 6400, 25600, 102400, 409600, 1638400, 6553600, 17895698 — i.e. the same quadrupling runaway and the same ~17.9M px ceiling observed on the real site.
No JS console errors and no UA sniffing involved; both browsers run identical code paths.
Comment 8•3 months ago
|
||
Comment 9•3 months ago
|
||
Nice -- comparing the reduced testcase against the site, it looks plausibly like it got at the correct root cause (and conveniently it hopefully means we're not at the mercy of ResizeObserver integer-overflow edge cases).
Comment 10•3 months ago
•
|
||
The reduced testcase matches the regression range from comment 1, too, which is another vote of confidence for the reduced testcase.
Let's morph this bug into a WebCompat Site Report, and I'll spin off a platform-bug to cover the fix that we need to make here.
In the meantime it might make sense to ship a sitepatch, maybe something like the following, tested in Stylus targeting www.knixteen.com -- this fixes the flickering for me and doesn't seem to have any obvious side effects:
.product__media-carousel .swiper-wrapper {
min-height: 0;
}
Updated•3 months ago
|
Updated•3 months ago
|
Updated•3 months ago
|
Updated•3 months ago
|
| Assignee | ||
Comment 11•4 days ago
|
||
Updated•4 days ago
|
Comment 12•3 days ago
|
||
Updated•3 days ago
|
Comment 13•3 days ago
|
||
Set min-height: 0 on the product media carousel's .swiper-wrapper on knixteen.ca/knixteen.com product pages. Firefox applies the aspect-ratio automatic minimum size to the wrapper, which has height: 100% against an indefinite containing block (platform bug 2065335). That feeds Swiper's ResizeObserver-driven slide sizing back into itself, so the slide heights grow without bound and the images and scrollbar flicker. With min-height: 0 the wrapper stays at its aspect-ratio height, which matches Chrome.
Updated•3 days ago
|
Comment 14•3 days ago
|
||
| bugherder | ||
| Assignee | ||
Comment 15•2 days ago
|
||
Oops, this ought to have been marked as leave-open.
Updated•2 days ago
|
Updated•2 days ago
|
Comment 16•1 day ago
|
||
Perfherder has detected a browsertime performance change from push f646cd91ab306d2d4093891b33de716ac8785607.
No action is required from the author; this comment is provided for informational purposes only.
| Improvement | Test | Platform | Options | Absolute values [old vs new] | Performance Profiles |
|---|---|---|---|---|---|
| 78% | media-capabilities encode-webrtc-video-av1-cold (doc) | macosx1500-aarch64-shippable | fission webrender | 0.12 ms -> 0.03 ms | Before/After |
Need Help or Information?
If you have any questions, please reach out to aesanu@mozilla.com. Alternatively, you can find help on Slack by joining #perf-help, and on Matrix you can find help by joining #perftest.
Details of the alert can be found in the alert summary, including links to graphs and comparisons for each of the affected tests.
Description
•