Closed
Bug 207481
Opened 22 years ago
Closed 21 years ago
[FIX]id attribute outside a form overrides
Categories
(Core :: DOM: Core & HTML, defect, P1)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla1.7alpha
People
(Reporter: joerg.baumann, Assigned: bzbarsky)
Details
(Keywords: testcase)
Attachments
(4 files)
688 bytes,
text/html
|
Details | |
692 bytes,
text/html
|
Details | |
775 bytes,
text/xml
|
Details | |
1.52 KB,
patch
|
jst
:
review+
jst
:
superreview+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4a) Gecko/20030401
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4a) Gecko/20030401
an image with id="reset" outside a form overrides the reset() function in the
Javascript representation of the form-element.
Reproducible: Always
Steps to Reproduce:
1. load testcase strict.html or transitional.html
2. enter text
3. click on "Reset me"
Actual Results:
entered text is still there
Expected Results:
entered text should be erased
I tested it with mozilla 1.0.1, 1.2.1, 1.3 1.4a, 1.4b on linux. All show the
same behavior.
There are three examples
1. strict.html (uses HTML 4.01 Strict and id attribute)
2. transitional.html (uses HTML 4.01 Transitional and name attribute)
3. xhtml.xml (uses XHTML 1.0 Strict and id attribute)
All are very similar and use following construct:
<img ... id/name="reset">
...
<form ... id/name="formular">
</form>
Case 3 works, but for case 1 and 2 the image overrides the reset()-function of
the formular which is then not longer accessbile from javascript.
So it's seems that the HTML DOM is broken here, but the XHTML DOM works.
Reporter | ||
Comment 1•22 years ago
|
||
broken example
Reporter | ||
Comment 2•22 years ago
|
||
broken example
Reporter | ||
Comment 3•22 years ago
|
||
working example
Reporter | ||
Updated•22 years ago
|
Attachment #124440 -
Attachment mime type: text/xml+xhtml → text/xml
Comment 4•22 years ago
|
||
this is the same problem that bug 148782, but I can't find an open bug about the
"reset" problem.
Summary: id attribute outside a form overrides → id attribute outside a form overrides
Comment 5•21 years ago
|
||
Wups sorry I added myself as CC and pressed enter stupidly.
This bug should be easy to fix now that bug 148782 is fixed. The mechanisms are
there, just have to use them.
Marking NEW. P2/Normal to match bug 148782. All/All, adding testcase keyword.
Severity: major → normal
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: testcase
OS: Linux → All
Priority: -- → P2
Hardware: PC → All
Comment 7•21 years ago
|
||
What a mess. Cc'ing bz, who fixed bug 148782. I don't know the code involved
here, and don't have time to analyze it. I expect jst or peterv can help too.
/be
![]() |
Assignee | |
Comment 8•21 years ago
|
||
We suck. Should have noticed the lack of an aForm check here... :(
![]() |
Assignee | |
Comment 9•21 years ago
|
||
Comment on attachment 138468 [details] [diff] [review]
Patch
jst, would you do the honors?
Attachment #138468 -
Flags: superreview?(jst)
Attachment #138468 -
Flags: review?(jst)
![]() |
Assignee | |
Comment 10•21 years ago
|
||
Taking.
Assignee: general → bz-vacation
Priority: P2 → P1
Summary: id attribute outside a form overrides → [FIX]id attribute outside a form overrides
Target Milestone: --- → mozilla1.7alpha
Comment 11•21 years ago
|
||
Comment on attachment 138468 [details] [diff] [review]
Patch
r+sr=jst
Attachment #138468 -
Flags: superreview?(jst)
Attachment #138468 -
Flags: superreview+
Attachment #138468 -
Flags: review?(jst)
Attachment #138468 -
Flags: review+
![]() |
Assignee | |
Comment 12•21 years ago
|
||
Fix checked in for 1.7a
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•