medialize / ally.js

JavaScript library to help modern web applications with accessibility concerns
http://allyjs.io/
MIT License
1.53k stars 82 forks source link

scroll element into view #15

Open rodneyrehm opened 9 years ago

rodneyrehm commented 9 years ago

investigate how well Element.scrollIntoView() is supported, what WebKit's proprietary [scrollIntoViewIfNeeded()]() (polyfill) brings to the table and how any of this can/should be used in scrollable lists. scrollIntoViewIfNeeded is likely not going to happen, but CSSOM View may have an answer.

scrollIntoView() may cause scrolling even when the element in question already is in view. I assume that's why WebKit introduced scrollIntoViewIfNeeded(). It may also move the entire page, instead of only the next scroll container

rodneyrehm commented 9 years ago

CSSOM View: Element.scrollIntoView() does not yet cover anything close to what the proprietary scrollIntoViewIfNeeded() proposes. Implementations of Element.scrollIntoView() in Gecko and Blink will scroll the entire document, even if the target element is already in view.