Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scroll-behavior & overscroll-behavior #21

Closed
una opened this issue Nov 11, 2021 · 8 comments
Closed

Scroll-behavior & overscroll-behavior #21

una opened this issue Nov 11, 2021 · 8 comments
Labels
accepted An accepted proposal focus-area-proposal Focus Area Proposal requires:tests Requires additional tests to be written
Milestone

Comments

@una
Copy link

una commented Nov 11, 2021

Description
The scroll-behavior CSS property sets the behavior for a scrolling box when scrolling is triggered by the navigation or CSSOM scrolling APIs.

Specification
CSSOM View Module

Tests

Rationale

@una una added the proposal label Nov 11, 2021
@una una changed the title Scroll-behavior Scroll-behavior & overscroll-behavior Nov 11, 2021
@foolip foolip mentioned this issue Nov 12, 2021
36 tasks
@foolip foolip added the requires:tests Requires additional tests to be written label Nov 18, 2021
@gsnedders
Copy link
Member

@foolip
Copy link
Member

foolip commented Nov 23, 2021

@flackr can you help judge if the tests here are sufficient? There are tests for both properties, but it's hard for me to tell if they're missing important things.

@flackr
Copy link

flackr commented Nov 25, 2021

It looks like we don't have any tests of the difference between overscroll-behavior: contain and overscroll-behavior: none. There is only a difference on certain platforms - I think Mac, iOS and Android - but we could write tests that pass if there is no observable default scroll overflow behavior on the current platform.

The CSS scroll-behavior tests look sufficient for the CSS property, though I haven't been able to find any that test the JS scrolling APIs with behavior: smooth, e.g. elem.scrollIntoView({behavior: 'smooth'});. There's scrollIntoView-smooth.html however it doesn't seem to have any checks that the scroll is not instant.

@foolip foolip added the accepted An accepted proposal label Dec 14, 2021
@foolip
Copy link
Member

foolip commented Jan 10, 2022

A proposed list of tests has been labeled with interop-2022-scrolling. It would be great if someone from each browser engine team can look over this list and comment if there are any issues.

@flackr
Copy link

flackr commented Jan 18, 2022

The proposed list is a good start, though we should work on adding support for the areas I mentioned above:

  1. The difference between overscroll-behavior: contain and overscroll-behavior: none on root and non-root scrollers. E.g. see crbug.com/1256902.
  2. Consider whether we can test that scrollIntoView-smooth.html is smooth reliably? E.g. maybe keep scrolling between 2 points until we observe a scroll that is somewhere in between.

@foolip foolip mentioned this issue Jan 20, 2022
@foolip
Copy link
Member

foolip commented Jan 20, 2022

A bunch of scrolling tests came up in my analysis in #48. It spans this issue and #14, but I'll past the whole comment since the root cause seems shared across the two in one case:

There are 3 tests that use new test_driver.Actions().scroll(...) and either ERROR or TIMEOUT in Firefox/Safari:

https://bugzil.la/1746601 is the Gecko bug about this testdriver API. The harness errors can probably be fixed with the proper t.step_func wrapping or similar.

/css/css-scroll-snap/input/keyboard.html is TIMEOUT in Firefox and Safari, but the first test runs and fails in Firefox. I don't think this is due to a missing testdriver.js API, but it needs investigation.

/css/cssom-view/scroll-behavior-smooth.html is ERROR in Chrome and TIMEOUT in Safari. Needs investigation.

@lilles
Copy link
Member

lilles commented Jan 21, 2022

I wrote the initial tests in /css/cssom-view/scroll-behavior-smooth.html, but tests using fragment navigation and history.back() was added later and they time out because the history behavior is different in Chrome than in Firefox. Seem like a history entry is not added for Chrome and history.back() in that test will navigate out of the test page resulting in a time out.

I split out the navigation tests into a separate scroll-behavior-smooth-navigation.html here: https://chromium-review.googlesource.com/c/chromium/src/+/3403031 and reported an issue here: https://bugs.chromium.org/p/chromium/issues/detail?id=1289222

@foolip
Copy link
Member

foolip commented Jan 21, 2022

@lilles this raises the question of whether scroll-behavior-smooth-navigation.html should be included in Interop 2022. @flackr can you have a look at this test and give advice?

@foolip foolip closed this as completed Aug 18, 2022
@gsnedders gsnedders added focus-area-proposal Focus Area Proposal and removed proposal labels Sep 16, 2022
@gsnedders gsnedders added this to the Interop 2022 milestone Sep 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted An accepted proposal focus-area-proposal Focus Area Proposal requires:tests Requires additional tests to be written
Projects
None yet
Development

No branches or pull requests

5 participants