Closed Bug 1589046 Opened 5 years ago Closed 4 years ago

[macOS] Jumpy scrolling when space is pressed in a small window

Categories

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

Desktop
macOS
defect

Tracking

()

VERIFIED FIXED
mozilla77
Tracking Status
firefox-esr60 --- unaffected
firefox-esr68 --- wontfix
firefox69 --- wontfix
firefox70 --- wontfix
firefox71 --- wontfix
firefox72 --- wontfix
firefox73 --- wontfix
firefox74 --- wontfix
firefox75 --- wontfix
firefox76 --- wontfix
firefox77 --- verified

People

(Reporter: csasca, Assigned: kats)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(3 files)

Attached video Jumpy scrollbar.mov

Affected versions

  • Firefox 68.1.0esr
  • Firefox 70.0
  • Firefox 71.0b1 DevEd
  • Firefox 71.0a1

Affected platforms

  • macOS 10.14/10.15

Steps to reproduce

  1. Launch Firefox.
  2. Access a link of choice. For example link.
  3. Adjust the window dimensions to make the vertical scrollbar appear.
  4. Using the touchpad, scroll to the top of the page, then press space.

Expected result

  • The page is scrolled down.

Actual result

  • The page scrolls down, then jumps back up.

Regression range
I will see for a regression asap.

Additional notes

  • The actual issue can be seen in the attachment.
  • Issue is not reproducible on Firefox 60.9.0esr.
  • The issue was reproducible on macbook pros with touchpad, as it requires to scroll with it to the top of the page in order to trigger the issue. I haven't tried on a iMac with a mouse and scroll.
  • Couldn't reproduce on Windows 10 nor Ubuntu 16.04.
Has Regression Range: --- → no
Has STR: --- → yes
Component: Keyboard Navigation → Panning and Zooming
Product: Firefox → Core

Bugbug thinks this bug is a regression, but please revert this change in case of error.

Keywords: regression

(In reply to Catalin Sasca, QA [:csasca] from comment #0)

Actual result

  • The page scrolls down, then jumps back up.

The first thing I would suggest checking is whether the problem reproduces with layout.css.scroll-anchoring.enabled=false. This "jumping after scrolling" symptom is often a result of scroll anchoring.

(In reply to Botond Ballo [:botond] from comment #2)

(In reply to Catalin Sasca, QA [:csasca] from comment #0)

Actual result

  • The page scrolls down, then jumps back up.

The first thing I would suggest checking is whether the problem reproduces with layout.css.scroll-anchoring.enabled=false. This "jumping after scrolling" symptom is often a result of scroll anchoring.

Tried again with layout.css.scroll-anchoring.enabled=false. The issue is still present.

Here's the regression for the issue:
Last good revision: e73aadc3a039337689f63caedf78e7c31cacda0a
First bad revision: 2b0f0d220a7cc3d6262706c160cc1900148dbe79
Pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=e73aadc3a039337689f63caedf78e7c31cacda0a&tochange=2b0f0d220a7cc3d6262706c160cc1900148dbe79

So the change made in bug 1474196 is that if we are in a momentum scroll (fingers lifted from the touchpad but still scrolling), receiving a scroll update from the main thread no longer interrupts the momentum scroll.

In that sense, this is more or less expected behaviour (we have upward momentum, the spacebar does not interrupt it, so after the spacebar scrolls us down, the upward momentum continues scrolling us up).

That said, the change in bug 1474196 was made with JS-originated scrolling in mind. Perhaps we want to distinguish between that and scrolling originated by user input such as pressing the spacebar, and still have the latter category cancel momentum.

Priority: -- → P3

P3, macos only, unassigned and we shipped several releases with this bug so wontfix 71.

Blocks: apz-mac

Reproduced the issue on bbc.com, Firefox 73.0b5, macOS 10.15.

I have a fix for this that I wrote last month and just got around to cleaning up.

Assignee: nobody → kats
Summary: [macOS] Jumpy scrollbar when space is pressed in a small window → [macOS] Jumpy scrolling when space is pressed in a small window

Hm, based on the gtest failure I guess what I wrote isn't actually what we want, although it fixes this particular issue.

After thinking about this some more, I'm not sure this is even really a bug. Consider the case where the direction of trackpad scrolling is the same as the spacebar scrolling - i.e. you're using the trackpad to fling your way down the page and also mashing the spacebar to scroll at the same time. In this case, I would expect the two scroll methods to combine to scroll even faster. Or in the case of a long page, scrolling up with trackpad while also mashing spacebar to scroll down - again I would expect the two scroll methods to combine without stepping on each others' toes.

I think with the STR in comment 0 the unexpectedness actually arises from the fact that the momentum scroll "keeps going" even though we've reached the top of the page, so when you spacebar down you don't expect that momentum to keep carrying on. This is a similar class of bug as bug 767197 and friends. Maybe the right fix here is to cancel the momentum scrolling once we reach the end of the page.

This prevents OS-produced momentum panning events from having an effect after
the user sees the momentum panning "end" due to scrolling as far as possible.

Depends on D69623

Pushed by kgupta@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b87c18be6ec6
Propagate the return value from AttemptScroll to DispatchScroll and CallDispatchScroll. r=botond
https://hg.mozilla.org/integration/autoland/rev/6aec54d11cbf
Terminate momentum panning once we reach a point where there is uncomsumed scroll. r=botond
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla77

The patch landed in nightly and beta is affected.
:kats, is this bug important enough to require an uplift?
If not please set status_beta to wontfix.

For more information, please visit auto_nag documentation.

Flags: needinfo?(kats)

Not worth uplifting I think.

Flags: needinfo?(kats)
Regressions: 1633103
Flags: qe-verify+

Reproduced the initial issue using an old Nightly from 2019-10-16, verified that this is fixed using latest Firefox Beta 77.0b5 on macOS 10.15.5 Beta.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
See Also: → 1685898
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: