Re: scrollIntoView scrolls what

On Mon, 2 Nov 2009, Mike Buchanan wrote:
>
> 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.

I think this level of detailed control probably belongs in the 
presentation layer (CSS), rather than in HTML. In fact arguably the whole 
method should move to CSSOM. Anne, what do you think?

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Thursday, 10 December 2009 12:53:20 UTC