[whatwg] scrollIntoView jarring?
Neil Deakin
enndeakin at gmail.com
Wed Apr 30 16:25:52 PDT 2008
>
> Firefox seems to have an internal check for isElementInView, because
> calling scrollIntoView(false) after scrollIntoView(true) does nothing.
> e.g. "scroll only if it's not visible at all"
>
>
Firefox 2 uses:
scrollIntoView(true)
scroll the element and its containers vertically such that the element
is aligned along the top edge
scrollIntoView(false)
scroll the element and its containers vertically such that the element
is fully visible, if possible. If it is already fully visible, don't
scroll at all. This is like an ensureElementIsVisible type function.
Horizontally, the ensureElementIsVisible behaviour is always used.
Firefox 3 changed the vertical behaviour to be compatible with IE,
although I personally think the Firefox 2 behaviour is more useful.
More information about the whatwg
mailing list