scrollIntoView scrolls what

View: New views
1 Messages — Rating Filter:   Alert me  

scrollIntoView scrolls what

by Mike Buchanan-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

It may be too late for this, but I think the spec would benefit from more clarity and/or control of what element.scrollIntoView does.  In particular, I'm thinking of the case where the element is contained in multiple structures that can scroll (e.g. both the div and whole page, or one scrolling div nested inside another).  

As it is, the spec is unclear about which elements should be scrolled, and there are scenarios in which there would be more than one way to scroll the content into view.  I would suggest at least standardizing this; I propose that when two possible solutions are available, the one that uses only deeper elements of the DOM be used.

For even more control, another optional argument could be added that allows the caller to specify which containers should be scrolled.

Cheers,
Mike

Addendum: Here's a bit of evidence that I'm not the only person who wants this: