Re: [csswg-drafts] [cssom-view] Add ScrollIntoViewMode ("always", "if-needed"); add FocusScrollOptions (#5677)

@zcorpan do you also suggest adding `scroll-behavior: smooth;` to it as well?

And what about `.focus()`? There's been earlier proposals for aligning `.focus()` with `.scrollIntoView`, giving it `.focus({scrollMode: "if-needed", block: "nearest", inline: "nearest", behavior: "smooth"})`. But if `scrollIntoViewIfNeeded` is standardised instead of `.scrollIntoView({scrollMode: "if-needed"})` does that mean we should create a `.focusIntoViewIfNeeded()`?

Also worth noting that the demand for the proposed spec is on a steady increase as well: https://npm-stat.com/charts.html?package=scroll-into-view-if-needed&from=2018-03-16&to=2023-03-16 🤔 

-- 
GitHub Notification of comment by stipsan
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/pull/5677#issuecomment-1474254566 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 17 March 2023 18:36:24 UTC