Foteos Macrides wrote:
I'm not sure if this is a layout or DOM issue (or something else), but I'm
guessing layout.
In:
http://www.macridesweb.com/oltest/MODAL.html
I use this javascript:
var
OLmRoot=(document.compatMode&&document.compatMode=='BackCompat')?'body':'html';
var root=document.getElementsByTagName(OLmRoot)[0];
if (root.style.overflow!='hidden') root.style.overflow='hidden';
to temporarily suppress any scrolling of the document by eliminating its
scroll bars (and later, after a user action, I restore the scroll bars).
To see the problem, scroll the document vertically until the 'Modal dialog'
link is at the top of the viewport, and then activate that link. In IE and
Opera there is a very modest horizontal shift of the document due to reflow
associated with the removal of the vertical scroll bar (because the
document content is using a horizontal centering style). But in Firefox the
document is reset (shifted both horizontally and vertically) to its 0,0
position before being centered horizontally.
I save the upper-left screen coordinates, and use self.scrollTo() to restore
the document's position when the scroll bars are restored, so this was not
a big issue in my mind, but a number of users have complained that, in so
many words, the substantial jump of the document display in Firefox is
jarring and causes them emotional distress. :<)
In any case, it does seem like a bug in Firefox when compared to IE and
Opera, so I'm raising the issue here for feedback from the Firefox
developers.
I'm using the recently released Firefox v2.0 (rv: 1.8.1), but was using
v1.5.0.8 (rv: 1.8.0.8) which also has this problem.
Fote
This is a known bug: see https://bugzilla.mozilla.org/show_bug.cgi?id=351491
which is "fixed-1.8.1.1", meaning (IIUC) that the current Fx 2.0.0.1
pre-release nightlies have the fix, and that the next Fx 2.0 release will
probably have it too. Whether the fix will be propagated to Fx 1.5.0.9 (when
it comes out) is anyone's guess.
Note, by the way, that even without scrollbars it is always possible to scroll
the document by means of the keyboard.
Best regards,
Tony.
_______________________________________________
dev-tech-layout mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-layout