"Boris Zbarsky" wrote
> Foteos Macrides wrote:
>> It does work if I impose a slight delay:
> ...
>> st=setTimeout("self.scrollTo(scLeft,scTop)",1);
>
> What's |self|?
>
> It sounds like scrollTo is not flushing out pending layout/style changes.
> It should be.
'self' is the current frame or iframe with an 'html' block. That code can
be changed to window.scrollTo(scLeft,scTop) with the same results -- an
apparent race condition for a bug associated with setting the
documentElement to 'hidden' -- which inappropriately resets the document to
0,0 and can do so after an immediately following scollTo() call unless
that's delayed so as to ensure that the scrollTo() in fact occurs after the
inappropriate reset.
I'm not sure what you mean by 'not flushing out pending layout/style
changes'. I do want the preceding h.style.overflow='hidden'; to be acted
up, and it is, with a reflow causing a slight shift to the right upon loss
of the vertical scroll bar for content that has a centered style.
If you haven't been following this thread, the 'inappropriate reset' bug is
gone in the 'Minefield' v3.0a1 (rv: 1.9a1) nightly trunk
build, but not in the v2.0 formal release nor the 'Bon Echo' v2.0.0.1pre
(rv: 1.8.1.1pre) branch build. I was trying to use the scrollTo() call as a
workaround for the bug until a v3.0 formal release eventually occurs.
Fote
--
_______________________________________________
dev-tech-layout mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-layout