Closed Bug 2009679 Opened 10 months ago Closed 5 months ago

www.voegol.com.br - Scrolling does not work or becomes glitchy

Categories

(Web Compatibility :: Site Reports, defect, P2)

Desktop
Windows 10

Tracking

(Webcompat Priority:P2, Webcompat Score:7, firefox153 verified)

VERIFIED FIXED
Webcompat Priority P2
Webcompat Score 7
Tracking Status
firefox153 --- verified

People

(Reporter: ctanase, Assigned: hiro)

References

()

Details

(Keywords: webcompat:platform-bug, webcompat:site-report, Whiteboard: [webcompat-source:web-bugs])

User Story

platform:windows,mac,linux,android
impact:content-missing
configuration:general
affects:all
branch:release
diagnosis-team:apz
user-impact-score:600

Attachments

(2 files)

Environment:
Operating system: Android 16/Windows 10
Firefox version: Firefox Mobile 146.0/148

Preconditions:
VPN pointing to Brazil

Steps to reproduce:

  1. Go to https://www.voegol.com.br/web/guest/nh/informacoes/bagagem
  2. Dismiss the cookie banner.
  3. Scroll the page. (on Desktop with mouse wheel or keyboard arrows)

Expected Behavior:
The page can be scrolled.

Actual Behavior:
Does not scrolls or it is glitchy.

Notes:

  • Reproducible on both Android and Desktop
  • Desktop workaround, click n drag the scroll bar
  • Reproduces regardless of the status of ETP
  • Reproduces in firefox-nightly, and firefox-release
  • Does not reproduce in chrome

Created from https://github.com/webcompat/web-bugs/issues/199582

Attached video Scroll ff vs chrome.mp4 —

I couldn't reproduce this on desktop, but in Fenix, it broke for me.

Severity: -- → S2
User Story: (updated)
Webcompat Priority: --- → P2
Webcompat Score: --- → 6
Priority: -- → P2
User Story: (updated)
Webcompat Score: 6 → 4

I can repro on Windows 11.

  • Desktop workaround, click n drag the scroll bar

This doesn't work for me, the page keeps resetting the scroll position.

User Story: (updated)

There are at least three problems here.

The first is partly a site problem, the page has an inline script in HTML:

function updateIframeHeight() {
    try {
        const doc = iframe.contentWindow.document;

        const ajustarAltura = () => {
            const scrollPos = window.scrollY;   // <<< salva posição

            iframe.style.height = 'auto';
            iframe.style.height = doc.body.scrollHeight + 'px';

            window.scrollTo({ top: scrollPos });   // <<< restaura posição
        };

        ajustarAltura();

        const observer = new MutationObserver(ajustarAltura);

        observer.observe(doc.body, {
            childList: true,
            subtree: true,
            attributes: true
        });

        for (let img of doc.images) {
            img.addEventListener('load', ajustarAltura);
        }

    } catch (e) {
        iframe.style.height = '80vh';
    }
}

The function adds a mutation observer on the document body, but the listener mutates the style attribute of an iframe, which causes mutation again, thus making an infinite cycle.

The second problem is, that this infinite resetting of iframe height seems to confuse our APZ layer, I can observe incorrect overscrolling on touchpad scroll instead of doing actual scroll. The same infinite resetting happens on Chrome but it doesn't show the same issue. Disconnecting the observer fixes the issue on Firefox.

The third problem is that the iframe body has subpixel-more height than what's reported by doc.body.scrollHeight because that one always reports rounded integer, which causes overscroll even without the mutation observer. Interestingly Chrome also has the same height difference but doesn't do overscroll.

With that I'm passing this to APZ.

User Story: (updated)
Webcompat Priority: P2 → P3

Geez, something has been changed? The site is "access denied" now.

User Story: (updated)
Webcompat Priority: P3 → P2
Webcompat Score: 4 → 7
User Story: (updated)

(In reply to Kagami Rosylight [:saschanaz] (they/them) from comment #4)

The third problem is that the iframe body has subpixel-more height than what's reported by doc.body.scrollHeight because that one always reports rounded integer, which causes overscroll even without the mutation observer. Interestingly Chrome also has the same height difference but doesn't do overscroll.

IIRC Chrome does never overscroll on any sub scroll containers.

This is similar to bug 2000834. A big difference is;

            const scrollPos = window.scrollY;   // <<< salva posição

            iframe.style.height = 'auto';
            iframe.style.height = doc.body.scrollHeight + 'px';

            window.scrollTo({ top: scrollPos });   // <<< restaura posição

As you can see in this script, we can't easily tell whether the script is trying to call scrollTo with the current scroll position. We need to a similar mechanics we've used for detecting scroll-linked effects.

In fact in the case of this bug's site the microtask for the MutationObserver seems to be invoked in this resize step.

Also note that chrome has a similar mechanics named SyncScrollAttemptHeuristic.

See Also: → 2000834
Depends on: 2025232

(In reply to Hiroyuki Ikezoe (:hiro) from comment #7)

Also note that chrome has a similar mechanics named SyncScrollAttemptHeuristic.

That's a pretty interesting find!

Based on the description of that class, it sounds similar to our ScrollLinkedEffectDetector, except they've gone further and implemented detection of effects in rAF callbacks (for which we have an open bug, bug 1276361).

Once thing I'm wondering about is: do you know what Chrome does if they detect a scroll-linked effect? Do they disable their equivalent of APZ, or something like that? (We have a pref to do that but it's disabled. Otherwise the main effect of detecting a scroll-linked effect in Firefox is this logic related to the frame delay.)

Drive-by, discovered this thread while investigating bug 2000834.

SyncScrollAttemptHeuristic seems to only feed their telemetry, here. This comment also seems to imply that it isn't serving any functional purpose.

Instead, Chromium seems ensure that the layout is up-to-date before computing the scroll offset to use. WebKit seems to do something similar, here.

Certainly feels... heavy-handed, but having experienced how bad the experience can get with bug 2000834 (And the general case of bug 1989868), on desktop, I think it may be worth following suit, before attempting a heuristics-based approach?

(In reply to David Shin[:dshin] from comment #9)

Instead, Chromium seems ensure that the layout is up-to-date before computing the scroll offset to use. WebKit seems to do something similar, here.

Hmm, aren't we already doing the equivalent of that here?

facepalms in confirmation bias
Ok, let me investigate further.

Yeah I have realized that SyncScrollAttemptHeuristic does nothing functional. I haven't further investigation on the chromium code.

I've since found that the programmatic scroll request is ignored when there's a user-triggered scroll animation is in progress. Note that this means the script triggering a programmatic scroll will get clobbered on Chrome, and it indeed seems to. See bug 2025232 comment 4.

Depends on: 2029043
Depends on: 2029551
No longer depends on: 2029043
See Also: → 2029043

I confirmed on a Fenix nightly that this bug was fixed.

I can confirm on Nightly on Windows too. 🎉

Status: NEW → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED

On desktop it still tries to overscroll on touchscreen though 🤔

Verified, the issue can be reproduced with the RC v151/ Firefox Nightly 152.0a1 (2026-05-14).
The scroll functionality works initially after opening the page, but it breaks after navigating multiple times between the menu options, especially after interacting with the scrollbar inside those pages:
"Articles allowed", restricted and prohibited","Hand luggage", "Checked baggage", "Differentiated baggage", "Excess weight", "Late or misplaced baggage", ...

Tested with:

  • Browser / Version: Firefox 151.0-candidate build 1 / Firefox Nightly 152.0a1 (2026-05-14)
  • Operating System: Windows 10
Assignee: nobody → bfarkas
Status: RESOLVED → REOPENED
Resolution: FIXED → ---

Bernadett, can't you see similar sluggish scrolling on Chrome? I can also see sluggish scrolling on Chrome as well so I presume it's an issue on the site itself.

Flags: needinfo?(bfarkas)

Hi Hiroyuki,

I can see similar sluggish and laggy scrolling in Chrome as well; however, the page remains responsive even though it scrolls more slowly. In Firefox, after a few interactions, the scrolling becomes unresponsive, and even controlling it with the mouse becomes difficult.

Flags: needinfo?(bfarkas)

Thanks. But I can see the unresponsive scroll on Chrome too.

It can be observed on the "Bagagem de mão" pane. It happens when the pane shows the vertical scollbar then disappeared on switching to the pane. And while the scrollbar is being shown, scrolling would make the whole page gets stuck.

So I am pretty sure the site does calculate the pane's iframe height dynamically and sometimes the calculation is wrong so that the iframe is scrollable. After the scroll wheel transaction ends, scrolling should be propagated the root scroll container properly.

With that I am going to close this bug.

Status: REOPENED → RESOLVED
Closed: 7 months ago → 5 months ago
Resolution: --- → FIXED

Bernadett, if you can see Firefox only issues on the site, it would be nice to open a new bug. Thanks!

Verified as FIXED using the RC Build

Tested with:

Browser / Version: Firefox 153.0-candidate build 1
Operating System: Windows 10 PRO x64

Status: RESOLVED → VERIFIED
Assignee: bfarkas → hikezoe.birchill
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: