Open Bug 1878876 Opened 2 years ago Updated 8 months ago

Autoscroll feature on tabs.ultimate-guitar.com fails

Categories

(Core :: Panning and Zooming, defect, P3)

Desktop
All
defect

Tracking

()

Webcompat Priority P3

People

(Reporter: denschub, Unassigned)

References

(Depends on 2 open bugs, )

Details

STR:

  1. Go to https://tabs.ultimate-guitar.com/tab/fountains-of-wayne/stacys-mom-chords-58371
  2. Click the "autoscroll" button

On macOS, Linux, and Windows 11 - this works fine. However, on Windows 10, according to this webcompat report and our own tests, it doesn't scroll.

We don't really know what's going on there, and building an isolated test case might be complicated. Filing it here in the hope you have an idea what might be happening here - but if not, we can try building a testcase for this.

Webcompat Priority: ? → P3

It works on my Thinkpad T460p with Windows 10 Pro 22H2.

Oops, I was misunderstanding what "autoscroll" means. I just tried to use our autoscroll feature, rather than the one provided by the site.

Indeed, the "autoscroll" feature on the site stops working after a little bit scrolling. Anyways, if the scrolling provided by the site, which means it's likely scrolling by JS. It's unclear to me the issue is related to APZ or not.

The severity field is not set for this bug.
:botond, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(botond)

Could you by chance reproduce this and capture a profile with logging enabled?

about:logging?modules=apz.controller:5,apz.manager:5,apz.inputqueue:5,apz.inputstate:5,apz.activeelement:5,apz.eventstate:5&output=profiler

Should provide us with the necessary info.

Flags: needinfo?(botond) → needinfo?(dschubert)

Forwarding the previous needinfo to James - I don't have a Windows 10 machine anymore, but he could reproduce this.

Flags: needinfo?(dschubert) → needinfo?(james)

I can look later, but if hiro can reproduce it that might be the faster way to debug whether this is actually APZ related, since he's presumably already used to investigating those bugs :)

(In reply to Dan Robertson (:dlrobertson) from comment #4)

Could you by chance reproduce this and capture a profile with logging enabled?

about:logging?modules=apz.controller:5,apz.manager:5,apz.inputqueue:5,apz.inputstate:5,apz.activeelement:5,apz.eventstate:5&output=profiler

Should provide us with the necessary info.

I got one: https://share.firefox.dev/4c6xdDk

In the profile I started and stopped the site's autoscroll feature twice; in between, I scrolled with the mouse wheel to a different starting position. The first time, the site's autoscroll feature did not scroll at all. The second time, it scrolled a small amount for a handful of frames and then stopped.

Flags: needinfo?(james)

I tried to debug this on a Windows 10 on a VM, unfortunately this issue can't be reproducible on the VM for some reasons. So there's definitely something preventing scrolling not specific to Windows version. I used Windows 10 Pro 22H2 FWIW.

Setting as S3/P3 since it is an intermittent failure, but going to add this to the diagnosis backlog.

Severity: -- → S3
Priority: -- → P3

Today I could reproduce this bug on my Windows 11 laptop. Also I could reproduce on my Linux desktop, but it's just once unfortunately.

And now I am suspecting this is something related to layout metrics in the site. On the windows 11 laptop, if I do full zoom to 120%, the autoscroll feature works, if it's 110%, it doesn't work.

OS: Windows 10 → Unspecified
OS: Unspecified → All
Summary: Autoscroll feature on tabs.ultimate-guitar.com fails on Windows 10 only → Autoscroll feature on tabs.ultimate-guitar.com fails
               t => {
                  const {
                    current: e
                  }
                  = n;
                  if (!c.current || !s.current || !e) return;
                  const o = 0 < window.innerHeight - a - s.current.getBoundingClientRect().bottom,
                  i = e instanceof Window ? e.scrollX : e.scrollLeft;
                  if (o) {
                    if (!t) return void h();
                    e.scrollTo(i, 0)
                  }
                  if (!o) {
                    const t = e instanceof Window ? e.scrollY : e.scrollTop;
                    e.scrollTo(i, t + p.current)
                  }
                  const l = 1000 / d.current * (Zo.nR / (40 - (40 / 15 - 1)));
                  r.current = window.setTimeout(g, l)
                }
              ),

The scroll operation in question is probably the second scrollTo in above code snipet. It looks suspicious related to our scroll position rounding / pixel alignment issues.

Whiteboard: [apz-needsdiagnosis]

On the Windows 11 laptop, the p.current value is fractional, it's 1.009765625. It's quite odd, Chrome on the same machine reports it 1. The value comes from window.outerWidth / window.innerWidth. I have totally no idea why these values are different on Windows.

Confirmed that setting layout.scroll.disable-pixel-alignment to true fixes this bug.

Depends on: 1774315, 1852884
Whiteboard: [apz-needsdiagnosis]
Depends on: 1946610
No longer depends on: 1774315
You need to log in before you can comment on or make changes to this bug.