Closed Bug 310439 Opened 19 years ago Closed 19 years ago

toggling on/off S5 slide system screws up positioning

Categories

(Core :: Layout, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 271776

People

(Reporter: stryker330, Unassigned)

References

()

Details

First off, if you're unfamiliar with S5, to toggle off the slide presentation,
hover your mouse to the lower-right hand corner and click the O with the
diagonal strike thru it. To enable it, click on it again.

This is an odd bug that I've been trying to narrow down. There are two noticable
symptoms:

1) After toggling off the slide system, the link containing the slashed O should
be focused. The link has display: block and positioned: fixed. When unfocused
(by clicking elsewhere), it magically shrinks. That's the first sign of the bug.

2) Toggle it back on. Look at each slide. Elements are positioned incorrectly,
in fact often overlapping.

The only way to fix the problem is to reload the page.

Here's the script powering the slide system:
http://www.meyerweb.com/eric/tools/s5/ui/default/slides.js

Clicking the toggling O calls toggle(), which in turn calls fontSize() and
fontScale(). fontScale() itself also calls fontSize().

Commenting out either call to fontSize() (either within fontScale() or toggle())
eliminates the bug.

Resizing the window also calls fontScale(). Interestingly enough, even if
fontSize() is not commented out, resizing doesn't trigger the bug.

So I'm not sure where the problem lies: toggle(), fontScale(), or fontSize()?

This bug doesn't appear in the Gecko 1.7 branch.
I just tried a bunch of window resizing, and it actually does trigger the bug,
though it's far less noticable than just toggling on/off the slides. It seems
the amount of resize the window increases the positioning fubaring. In fact,
resizing it to the smallest possible window that still shows the document and
maximizing it will make it really screwed up.

I also noticed that it's not only the positioning that goes awry. The list icons
also don't resize properly - after doing the above, the icons stay tiny as if
the window were still really small.

So the culprit is not toggle(), it's fontSize().

fontSize() creates an inline style element the first time it's called, and
replaces the style element's text each call. I tried replacing all that hackery
with a simple |document.body.style.fontSize = value| line, but the bug didn't go
away.

*** This bug has been marked as a duplicate of 271776 ***
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.