W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2010

[whatwg] scrollIntoView()

From: Anne van Kesteren <annevk@opera.com>
Date: Tue, 17 Aug 2010 11:12:33 +0200
Message-ID: <op.vhkru6e764w2qv@anne-van-kesterens-macbook-pro.local>
Ian has suggested several times so far that I take over editing of the  
scrollIntoView() method and define it in the CSSOM View Module:


I agree that is a more appropriate place. I played around with it a little  
and it seems that in browsers other than Opera invoking the method affects  
the scrolling position of ancestor documents. I.e. if you have a document  
in an iframe where scrollIntoView() is invoked on an element not only will  
that document scroll, but the document the iframe is in will scroll as  
well. In addition this will dispatch events to each document object of  
which the document is scrolled, and any elements that are scrolled in the  
process (the order is innermost-outermost, and sync in Webkit, async in  
Gecko, afaict).

I was wondering whether this should happen cross-origin as well. That  
seems like a minor leak of some sorts. And if that should happen, should  
the sandbox="" attribute disable it?


Anne van Kesteren
Received on Tuesday, 17 August 2010 02:12:33 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:26 UTC