Missing resize when showing/hiding elements from Javascript




12 years ago
12 years ago


(Reporter: otaylor, Unassigned)


1.8 Branch

Firefox Tracking Flags

(Not tracked)



(4 attachments)



12 years ago
This test case shows a case when changing a <div/> from display: none to 
display: block doesn't cause the containing table to resize; the table is 
redrawn overlapping adjacent content.

If the window is resized, or various other things that are done that
might force a relayout, the problem fixes itself.

I'm going to attach two variants; both exhibit the problem, both exhibit
it intermittently; if the test case doesn't show a problem when first 
loaded hitting reload and trying again a few times turns it up. 
The bug and the intermittency is observed on both and XP.

 - First: somewhat simpler, problem occurs less frequently
 - Second: somewhat more complex, problem occurs more frequently (?)

The difference may be placebo, so start with the first case and only
try the second if it doesn't reproduce.

I'm not sure what elements are necessary to reproduce; most simplifications
of the first test case I tried made the problem go away.

Comment 1

12 years ago
Created attachment 249188 [details]
Simpler test case (click on the green block)

Comment 2

12 years ago
Created attachment 249191 [details]
More complex case (click on the green block)

Comment 3

12 years ago
Created attachment 249193 [details]
Screenshot of misbehavior

Comment 4

12 years ago
Created attachment 249200 [details]
Single table version

Attaching another version because it demonstrates that nested tables aren't necessary. Some experimentation with this test case indicates that the necessary conditions are similar two:

 - Table row with two cells
 - Javascript modifies contents of both cells
 - The contents of one cell change height
 - The contents of the other cell change without changing height

The order of the two cells doesn't matter.
You need to log in before you can comment on or make changes to this bug.