Closed Bug 305640 Opened 19 years ago Closed 19 years ago

getElementById not working reliably with existing hash entries.

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
major

Tracking

()

RESOLVED FIXED
mozilla1.8beta4

People

(Reporter: martijn.martijn, Assigned: jst)

References

()

Details

(Keywords: fixed1.8, regression, testcase, Whiteboard: [HAVE FIX])

Attachments

(1 file)

See url testcase.
The red bordered div should be draggable.
This worked in the 2005-08-09 trunk build, but fails in the 2005-08-10 trunk build.
http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=all&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2005-08-09+07%3A15%3A00&maxdate=2005-08-10+08%3A00%3A00&cvsroot=%2Fcvsroot
Maybe a regression from fixing bug 303420?

The problem is that I get a js error:
Error: sun has no properties
Source File: https://bugzilla.mozilla.org/attachment.cgi?id=184050
Line: 21
So it seems that document.getElementById("sun") returns null now in this testcase.
1.8b was not branched then, so this bug should also be visible in the 1.8b branch.
Flags: blocking1.8b4?
Assignee: general → jst
Flags: blocking1.8b4? → blocking1.8b4+
Flags: blocking1.8b5+
This is pretty self explanatory...
Attachment #193732 - Flags: superreview?(bzbarsky)
Attachment #193732 - Flags: review?(bzbarsky)
Whiteboard: [HAVE FIX]
Status: NEW → ASSIGNED
OS: Windows XP → All
Hardware: PC → All
Summary: document.getElementById not working while page is loading? → getElementById not working reliably with existing hash entries.
Target Milestone: --- → mozilla1.8beta4
Comment on attachment 193732 [details] [diff] [review]
Make getElementById() find flushed tags even if an entry already existed for them in our hash table.

>Index: content/html/document/src/nsHTMLDocument.cpp

>+    // The we could now have either a new entry, or the entry could

s/The we/We/

r+sr=bzbarsky
Attachment #193732 - Flags: superreview?(bzbarsky)
Attachment #193732 - Flags: superreview+
Attachment #193732 - Flags: review?(bzbarsky)
Attachment #193732 - Flags: review+
Attachment #193732 - Flags: approval1.8b4?
Comment on attachment 193732 [details] [diff] [review]
Make getElementById() find flushed tags even if an entry already existed for them in our hash table.

I'd love to see this on the trunk for a bit of baking!
Comment on attachment 193732 [details] [diff] [review]
Make getElementById() find flushed tags even if an entry already existed for them in our hash table.

a=shaver
Attachment #193732 - Flags: approval1.8b4? → approval1.8b4+
Fixed on trunk and branch. No baking needed for this one IMO. Easy backout if
the unexpected was to happen...
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Keywords: fixed1.8
Resolution: --- → FIXED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: