[cssom-view] smooth scroll on focus()?

CSSOM View scroll-behavior says: "The scroll-behavior property specifies
the scrolling behavior for a scrolling box, when scrolling happens due to
navigation or CSSOM scrolling APIs. Any other scrolls, e.g. those that are
performed by the user, are not affected by this property".  To me this
suggests that if the user agent scrolls as a result of a call to
Element.focus(), that scroll-behavior should not be respected.

Is that intentional?  It seems unfortunate (eg. for accessibility) that
it's possible to get a smooth scroll to an element via
Element.scrollIntoView, but not if you also want the element to be receive
focus in the process.

Perhaps scrollIntoView should now return a promise (or ScrollOptions should
take a callback) so that an action like 'focus' can be performed when the
scroll animation completes?


Received on Friday, 4 March 2016 03:20:24 UTC