Closed
Bug 40259
Opened 25 years ago
Closed 24 years ago
Alert during onload makes browser forget to update DIV with changed innerHTML
Categories
(Core :: DOM: Core & HTML, defect, P3)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
Future
People
(Reporter: violaine.lebeaupin, Assigned: jst)
Details
(Keywords: testcase)
Attachments
(1 file)
322 bytes,
text/html
|
Details |
This code doesn't work always correcly. Often, the content changes only if you
reload this page or load an another page :
test.html :
<html>
<head>
<title>Test innerHTML</title>
<script src = "page.js"></script>
<script language = "JavaScript">
function initialiser()
{
var page = new Page() ;
page.initialiser() ;
}
function finaliser()
{
page = null ;
}
</script>
</head>
<body onload="initialiser()" onunload="finaliser()">
<div id="divAgent">
</div>
</body>
</html>
page.js :
function Page ()
{
this.initialiser = PageInit;
}
function PageInit()
{
document.getElementById("divAgent").innerHTML = "Bonjour";
alert ("fin init");
}
Reporter | ||
Comment 1•25 years ago
|
||
I have tested this with the version of 22 May of Mozilla.
Comment 2•25 years ago
|
||
reassigning to dom0, pls triage if not yours
Assignee: clayton → jst
Component: HTML Element → DOM Level 0
QA Contact: petersen → desale
Comment 3•25 years ago
|
||
Comment 4•25 years ago
|
||
Confirming (Win98, 2000 052508).
The alert during onload seems to cause the innerHTML change to erase rather
than update the div. As the reporter said, leaving the page (by clicking
on "Tinderbox" in the personal toolbar, for example) often causes the new text
to finally show up.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: testcase
Summary: Change content of a DIV with innerHTML → Alert during onload makes browser forget to update DIV with changed innerHTML
Assignee | ||
Comment 5•25 years ago
|
||
Here's what I see (on linux), when I load the testcase it opens the alert and in
the document window I see "above" and then an empty line, and then the button,
immediately when I click "Ok" in the alert box the "New content" appears.
It seems like the alert window is blocking the reflow events form being
processed, I tried flushing the pending reflow notification before the alert
window is opened and that solved the problem I saw.
I never saw any inconsistent behavior tho, maybe that's a Win95 problem, I don't
have a Win95 box to test on here...
No sure what to do here yet, I think flushing pending notifications on the
presshell before opening the alert is acutally the right thing to do tho.
Status: NEW → ASSIGNED
Comment 6•25 years ago
|
||
I actually saw "new content" not show up until I started to leave the page.
The area was blank while the alert was up and afterward. (not 100% reprod)
Assignee | ||
Comment 7•25 years ago
|
||
This bug has been marked "future" because the original netscape engineer
working on this is over-burdened. If you feel this is an error, that you or
another known resource will be working on this bug,or if it blocks your work
in some way -- please attach your concern to the bug for reconsideration.
OS: Windows 95 → All
Hardware: PC → All
Target Milestone: --- → Future
Comment 8•24 years ago
|
||
build 2001041508 on win2k : opening the testcase :
"above
below [try again]"
then I see the alert ("Alert!").
Upon clicking OK in the alert, the "New content" line appears between "above"
and "below". Reloading multiple times shows the same (correct?) behavior.
Sometimes (probably due to the cache), the "new content" line even appears while
the alert dialog is up.
Adding qawanted keyword.
Keywords: qawanted
Assignee | ||
Comment 9•24 years ago
|
||
I believe this was fixed by hyatt's paint supressing changes that went in about
a month ago, marking FIXED.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•