Closed Bug 40197 Opened 25 years ago Closed 25 years ago

Named anchor node is returning bogus "href" value

Categories

(Core :: DOM: HTML Parser, defect, P3)

defect

Tracking

()

VERIFIED FIXED

People

(Reporter: cmanske, Assigned: jst)

References

Details

(Keywords: relnote, Whiteboard: [nsbeta2+][dogfood-])

Attachments

(1 file)

When I get the "href" attribute on a named anchor node, such as: <a name="foo"></a> I get "file:///d:/" It should be null, or an empty string at minimum. This error crept in recently. In Composer, we detect "links" vs. "named anchors" by testing the "href" and "name" attributes, and now getting properties on a named anchor gets this bogus link href instead. I'll attach a clear test case.
This bug prevents Composer's Property editing on a named anchor, since it thinks it's a link when it isn't. I'm not really sure if it belongs to "JavaScript Engine", but if I examine the HTML via Composer's debug menuitem Output HTML, the incorrect "href" value is not in the DOM dump, so I don't think it is a DOM error.
Blocks: 34519
Keywords: dogfood, nsbeta2
Serious. Phil, would you provide additional data? PDT
Assignee: rogerl → pschwartau
I'd guess that this problem has the same root cause as bug 40078, "?a name?'s being treated as ?a href?'s" and bug 37201, "a without href is draggable, acts like href="./" when dragged". It appears that even <A> elements with no attributes at all are displaying signs of HREF-ness.
Yes, it does seem to be related to 40078, but note that the fundamental cause is that named anchors are reporting non-null "href" values!
*** Bug 40078 has been marked as a duplicate of this bug. ***
Please examine bug 40078 -- there's lot's of usefull info there.
Putting on [nsbeta2+][dogfood-] radar. Does not need a fix ASAP for daily work, but we should fix this for beta2. Can scroll to it for M16.
Keywords: relnote
Whiteboard: [nsbeta2+][dogfood-]
Is this a parser issue ? There is no interaction with the JS Engine that would cause this problem -
Assignee: pschwartau → rickg
Component: Javascript Engine → Parser
QA Contact: pschwartau → janc
Jan: I don't understand your comment "Can scroll to it for M16." Also: How can you say "Does not need a fix ASAP for daily work"? So the user inserts a named anchor, then wants to edit it. When they try, they get a link dialog instead, and they're completely confused. The fact that a named anchor is reporting a bogus "href" is a fundamentally bad thing and *must* be corrected for beta2 - thanks for recognizing that. Note that the value of the href reported is the url of the documents folder! If you save test file to some subdirectory, that's what you'll see in the alert messagebox.
I have a fix for this, the problem is in DOM land so I'll take this bug from you Rick, I hope you don't mind :)
Assignee: rickg → jst
OS: Windows NT → All
Hardware: PC → All
Status: NEW → ASSIGNED
Fixed.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
2000-06-29-14-M17 : Mac 2000-06-28-21-M17 : Win98 Linux build not working, will test later.
Fixt on Linux too 2000-07-06-08-M17 - Linux Marking verified
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: