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

[cssom-view] Restore "instant" IDL enum value of ScrollBehavior #7773

Closed
saschanaz opened this issue Sep 22, 2022 · 2 comments · Fixed by #8107
Closed

[cssom-view] Restore "instant" IDL enum value of ScrollBehavior #7773

saschanaz opened this issue Sep 22, 2022 · 2 comments · Fixed by #8107

Comments

@saschanaz
Copy link
Member

#3074 removed "instant" from the IDL, arguing that it's removed from scroll-behavior CSS property. But that enum value is not for CSS but for scroll APIs and is still supported on all engines including Gecko, Blink, and WebKit. It's behavior is different from "auto", per https://w3c.github.io/csswg-drafts/cssom-view-1/#perform-a-scroll:

  1. If the user agent honors the scroll-behavior property and one of the following are true:

    • behavior is "auto" and element is not null and its computed value of the scroll-behavior property is smooth
    • behavior is smooth

    ...then perform a smooth scroll of box to position. Once the position has finished updating, emit the scrollend event. Otherwise, perform an instant scroll of box to position. After an instant scroll emit the scrollend event.

Passing "instant" allows devs to force instant scroll regardless of scroll-behavior property.

Hi @tabatkins, I think you were confused there, what do you think?

@saschanaz
Copy link
Member Author

saschanaz commented Jan 24, 2023

Can someone else take a look if @tabatkins is busy, perhaps @emilio? (PR #8107)

@emilio
Copy link
Collaborator

emilio commented Jan 24, 2023

Yeah I think that was a mistake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants