This feature allows scrollIntoView with behavior: "smooth" to run concurrently on scroll containers which are neither descendants nor ancestors of one another. scrollIntoView with behavior: "smooth" is a JavaScript method developers can use to cause scroll containers to scroll to their descendants via a gentle scroll animation. This feature fixes Chrome's implementation of the API so that ongoing scrollIntoView animations are not cancelled by unrelated scrolls on other scroll containers. This codepen[1] demonstrates the difference in behavior between Chrome and other browsers. The features also fixes cases where Chrome fails to scroll to a page's fragment anchor because of a competing scrollIntoView that is invoked when the page loads. [1] https://codepen.io/awogbemila/pen/GRaJQMG
Developers sometimes wish to synchronize scrolling between multiple scroll containers using the scrollIntoView API. For example, a developer might want to synchronize a table of contents sidebar with the associated content with smooth scrolls, but this is broken by the fact that smoothly scrolling the content would prevent the table of content from being smoothly scrolled or vice-versa. This change makes Chrome's implementation of scrollIntoView more similar to the implementations in at least 2 other major browsers, Firefox and Safari.
Samples: https://davmila.github.io/MultiSmoothScrollDemo https://codepen.io/awogbemila/pen/GRaJQMG