Open Bug 1753188 Opened 2 years ago Updated 1 year ago

scroll-snap-type blocks scrolling using a mouse wheel

Categories

(Core :: Layout: Scrolling and Overflow, defect)

Firefox 98
defect

Tracking

()

People

(Reporter: jari.palo, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Steps to reproduce:

Created a webpage using CSS scroll snap where parts of the page is using scroll-snap-align property, and some parts isn't using it.

Reproduction: https://codepen.io/japalo/pen/JjOXaBp

Actual results:

Firefox on Windows 10 blocks scrolling with mouse wheel below the snapped elements, and Firefox on MacOS and Windows doesn't snap scroll on mouse wheel scrolling. On windows i managed to trigger snap by scrolling and then clicking somewhere on the document. This triggers a scroll snap.

Expected results:

Scroll snap should occur on the elements that has scroll-snap-align, and the elements without it should be "vanilla" scroll.

The Bugbug bot thinks this bug should belong to the 'Core::Layout: Scrolling and Overflow' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Layout: Scrolling and Overflow
Product: Firefox → Core

Thanks for the bug report! I can reproduce, using my mouse's scrollwheel, in Firefox Nightly on Linux as well as MacOS. So this doesn't seem to be Windows-specific.

(Two-finger touchpad-scrolling does seem to work, i.e. it does reach the "won't let us scroll to this" text; it only seems to be mousewheel scrolling that's broken. I don't know enough about scroll-snap to know if that's surprising or not, but I figured I'd mention it.)

hiro, do you know if this is a known issue?

Severity: -- → S3
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(hikezoe.birchill)

As a spot-check, I tested Nightly 2021-01-01 (version 86) on Linux, and I can reproduce in that version as well. So, this seems to not b a regression (or at least, it didn't regress in the last ~year).

Though I can't recall there's already a bug report or not, my best guess is that this is caused by this check, which, I believe, has been there since our previous old scroll snap implementation. Just dropping the check should work I guess.

Flags: needinfo?(hikezoe.birchill)

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

Though I can't recall there's already a bug report or not, my best guess is that this is caused by this check, which, I believe, has been there since our previous old scroll snap implementation. Just dropping the check should work I guess.

I was wrong. Dropping the check didn't help at all. :/

This is due to our default scroll snap proximity threshold, it's 200px in CSS units. If the pref value is 100px, the test case in comment 3 works. Or if I change mousewheel.min_line_scroll_amount to 50, it works too.

Depends on: 1766386

Are there any plans to change the defaults for these values?

Here is another very simple example showing this issue. This demo completely prevents me from scrolling upwards using my mouse wheel in Firefox.

Indeed, changing either of the config values mentioned in comment #7 does seem to let me escape this scroll trap. Surely this means that either the defaults or the overall behavior need to be adjusted?

(In reply to [:bali balo] from comment #8)

Are there any plans to change the defaults for these values?

Just spotted the "Depends on" bug at https://bugzilla.mozilla.org/show_bug.cgi?id=1766386 - apologies, didn't see that before. Looks like it is being considered at least

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: