-
Notifications
You must be signed in to change notification settings - Fork 12.8k
ScrollBehavior definition is missing 'instant' for scrollTo #46654
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
Comments
I guess it's microsoft/TypeScript-DOM-lib-generator@fe01c9a#r31507840, |
I stand corrected! For anyone else who comes across this, in my testing I found that browsers do indeed treat |
@patik auto to me works as scrolling does, I guess that is because I have enabled smooth scroll in my browser... However, I would really like the instant to be available |
β¦auto")` relevant issue:microsoft/TypeScript#46654
- Don't need {behavior: 'instant'}, acts like auto microsoft/TypeScript#46654 (comment) - TS config abhors unused parameter
- TS dislikes {behavior: 'instant'}, suggests defaulting to auto microsoft/TypeScript#46654 (comment) - TS config abhors unused parameter
That most definitely is not true. It depends on the CSS property The default value is |
not ideally solution but this works for me when upgrading typescript might not be an option. |
Bug Report
π Search Terms
instant
scrollbehavior
scrollTo
type definition
π Version & Regression Information
v4.4.4, but it's also mentioned in #28755 (v3.2.1)
β― Playground Link
Playground link with relevant code
π» Code
π Actual behavior
The value of
'instant'
cannot be assigned tobehavior
when usingelement.scrollTo()
according to https://developer.mozilla.org/en-US/docs/Web/API/Window/scrollTo as well as testing it in a browserπ Expected behavior
The value of
'instant'
is allowed when usingelement.scrollTo()
according to https://developer.mozilla.org/en-US/docs/Web/API/Window/scrollTo as well as testing it in a browser. Note that a similar issue, #28755, was aboutscrollIntoView()
, which indeed does not allow'instant'
.The text was updated successfully, but these errors were encountered: