Skip to content

Scroll-behavior & overscroll-behavior #21

Closed

Description

@una

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

Activity

  1. changed the title [-]Scroll-behavior[/-] [+]Scroll-behavior & overscroll-behavior[/+] on Nov 11, 2021
  2. added
    requires:tests
    on Nov 18, 2021
  3. foolip commented on Nov 23, 2021

    @foolip
    Member

    @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.

  4. flackr commented on Nov 25, 2021

    @flackr

    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.

  5. added
    accepted
    on Dec 14, 2021
  6. foolip commented on Jan 10, 2022

    @foolip
    Member

    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.

  7. flackr commented on Jan 18, 2022

    @flackr

    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.
  8. foolip commented on Jan 20, 2022

    @foolip
    Member

    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.

  9. lilles commented on Jan 21, 2022

    @lilles
    Member

    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

  10. foolip commented on Jan 21, 2022

    @foolip
    Member

    @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?

  11. added
    focus-area-proposal
    and removed on Sep 16, 2022
  12. added this to the Interop 2022 milestone on Sep 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedfocus-area-proposalrequires:tests

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions