Closed Bug 33953 Opened 25 years ago Closed 25 years ago

DOM-append into "overflow: scroll" box doesn't repaint, is wacky and doesn't adjust scrollbars

Categories

(Core :: XUL, defect, P3)

x86
Windows NT
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: joe, Assigned: eric)

References

Details

(Whiteboard: have fix awaiting checkin)

Attachments

(1 file)

If you insert an element into another element which has "overflow: auto" or "overflow: scroll", the newly inserted element does not get painted immediately after it is inserted. However, if you cover up the region where the new element is (with another window), and then reveal it again, the block will be painted.
Attached file bug test case (deleted) —
Forgot to mention that if "overflow: scroll", the newly inserted block will in fact be painted, but only in the area where it intersects the scrollbars... and it gets painted OVER the scrollbars, which is a whole nother bug that I am about to file.
Blocks: 33955
Blocks: 33957
The reporter opened 2 other bugs a few minutes after opening this one: bug 33955 and bug 33957. They are so similar that they will be closed as dup. Bug 33955 says: When you attempt to use the DOM to append an element into another element whose "overflow: scroll" or "overflow: auto", weird weird stuff occurs. First of all, the element doesn't actually get inserted into the parent element... it gets inserted into the region which contains the parent's scrollbars! Also, the new element isn't painted immediately (see bug #33953). Finally, using the parent's scrollbars has no effect on the new element.. it just sits there as if it had "position: fixed". (new testcase on http://bugzilla.mozilla.org/showattachment.cgi?attach_id=7108) Bug 33957 says: When using the DOM to append an element into another element whose "overflow: auto" or "overflow: scroll", after the append the scrollbars on the parent element should update their proportions to make sure the newly appended element can be viewed. This fails to happen... and as a matter of fact, some very ugly stuff happens when you try to do this. See bug #33953 and #33955. Once the ugliness in #33953 and #33955 gets fixed, this bug is next in line to be fixed.
No longer blocks: 33955, 33957
Summary: DOM-append into "overflow: scroll" box doesn't repaint → DOM-append into "overflow: scroll" box doesn't repaint, is wacky and doesn't adjust scrollbars
*** Bug 33955 has been marked as a duplicate of this bug. ***
*** Bug 33957 has been marked as a duplicate of this bug. ***
This seems to work fine when GfxScrollbars are turned OFF. There are problems when they are turned on, however. First, I don't see any text getting appended anywhere. Second, the page gets pretty strange; resizing makes all content invisible for example. There are some problems here, I'm not sure who's they are though. I believe this is a specific case of the general problems with GfxScrollbars on overflow:scroll elements. Confirming, but these probably belong in another area - Pierre, any ideas? Maybe Eric Vaughan?
Status: UNCONFIRMED → NEW
Ever confirmed: true
It's probably a dup of bug 36812 ("GFX scrollbars break absolutely positioned elements") assigned to evaughan.
Assignee: pierre → evaughan
Component: Style System → XP Toolkit/Widgets
This now works in my build. I'll check it in soon. BTW the included test case also has absolute positioned code in it. This is another bug that is known not to work and is different from this bug. So the test case to test this bug should be this instead: <html> <head> <title>Test</title> <script language="Javascript1.3"> function insert() { var button = document.createElement("button"); button.style.width = "50px"; button.style.height = "50px"; button.style.backgroundColor = "red"; var div = document.getElementById("div1"); div.appendChild(button); } </script> </head> <body> <button onclick="insert()">insert</button> <div id="div1" style="background-color: slateblue; width: 100%; height: 100px; overflow: scroll;"> blah blah blah </div> </body> </html>
Status: NEW → ASSIGNED
Whiteboard: have fix awaiting checkin
fixed
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Verified. Windows: 2000-07-13-09-M17
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: