Closed
Bug 127847
Opened 23 years ago
Closed 23 years ago
[FIX]<object>'s not included in form.elements
Categories
(Core :: Layout: Form Controls, defect, P1)
Core
Layout: Form Controls
Tracking
()
RESOLVED
FIXED
mozilla1.2alpha
People
(Reporter: andrea.aime, Assigned: bzbarsky)
References
()
Details
Attachments
(2 files, 1 obsolete file)
195 bytes,
text/html
|
Details | |
11.12 KB,
patch
|
bzbarsky
:
review+
jst
:
superreview+
|
Details | Diff | Splinter Review |
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:0.9.8+) Gecko/20020220
BuildID: 2002022003
www.trenitalia.it provides a traintable search engine.
The query form is provided with default values (current
date and hour), but unfortunately the field placement
is wrong if you choose italian language, values are
not placed in their destination field, but in the next
one
Reproducible: Always
Steps to Reproduce:
1. www.trenitalia.it
2. enter the english version of the site, form is properly initialized
3. go back
4. enter the italian version of the site
5. the fields are not initialized properly
Actual Results: ... had to fill the form fields by hand
Expected Results: to work in Italian as it does in English, French, Espagnol,...
(works in every other language, and works as expected in IE)
Comment 1•23 years ago
|
||
->html form controls
Assignee: trudelle → rods
Component: XP Apps → HTML Form Controls
QA Contact: sairuh → madhur
![]() |
Assignee | |
Comment 2•23 years ago
|
||
The site seems to be one single flash thing. I see no way to navigate it and
see no content (but I have no flash).
Comment 3•23 years ago
|
||
Happens w/ Build: 2002022503 OS: WinME
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 5•23 years ago
|
||
I have the same problem as Boris. Can someone provide a link to the portion of
the site with the referenced input fields?
Reporter | ||
Comment 6•23 years ago
|
||
Try the following URL:
http://62.110.170.238/home/it/index.html
Updated•23 years ago
|
QA Contact: madhur → tpreston
Comment 7•23 years ago
|
||
This may be an Evangelism issue; see bug 138767
![]() |
Assignee | |
Comment 8•23 years ago
|
||
*** Bug 138767 has been marked as a duplicate of this bug. ***
![]() |
Assignee | |
Comment 9•23 years ago
|
||
![]() |
Assignee | |
Comment 10•23 years ago
|
||
Jst, the problem here is that IE counts any <object> that comes inside a form in
form.elements. Neither Mozilla nor NS4 does so.... Should we attempt to do
that (a major PITA, if I remember how this stuff works)? Or call this broken
behavior on the part of IE and evangelize the site?
OS: Windows NT → All
Hardware: PC → All
Comment 11•23 years ago
|
||
To muddy the waters further, there is a spec that says the OBJECTs should be
able to submit their values. In that case it makes *sense* to make OBJECTs submit.
![]() |
Assignee | |
Comment 12•23 years ago
|
||
*** Bug 139206 has been marked as a duplicate of this bug. ***
Comment 13•23 years ago
|
||
Summary: <object> elements are not included in the form.elements HTMLCollection.
This is backwards-compatible with NS4 but not with IE.
According to jkeiser, there is "a" spec that says <object> should be able to
submit their values, however.
Thoughts?
Summary: Default form values incorrect (but only when using italian language) → <object>'s not included in form.elements
Comment 14•23 years ago
|
||
The DOM spec also defines a form property on object elements (see
nsIDOMHTMLObjectElement) so that seems to indicate that objects are indeed parts
of a form if they're associated with a form. IMO we should follow IE here, NS4x
didn't support object tags at all, so we can't really rely on what it did here.
This shouldn't really be that hard to fix, we'll just need to add the form fluff
to nsHTMLObjectElement and places where form controls are treated specially
(i.e. the html sink).
Comment 15•23 years ago
|
||
*** Bug 155084 has been marked as a duplicate of this bug. ***
Comment 16•23 years ago
|
||
*** Bug 160491 has been marked as a duplicate of this bug. ***
Comment 17•23 years ago
|
||
Helpful comments by Marcus from the duplicate bug 160491:
------- Additional Comment_ #1 From Marcus Campbell 2002-08-01 06:57 -------
IE counts OBJECTs as FORM control elements but Mozilla doesn't.
As a result of this, the values being assigned to the INPUTs via
document.forms[0].elements[?].value are being assigned differently.
I don't know enough about the DOM to tell for certain,
but under DOM Level 1 [1] it seems that IE is right.
Under Level 2 [2] it seems Mozilla is right.
[1] http://www.w3.org/TR/REC-DOM-Level-1/level-one-html.html#ID-9893177
[2] http://www.w3.org/TR/2001/WD-DOM-Level-2-HTML-20011025/html.html#ID-9893177
![]() |
Assignee | |
Comment 18•23 years ago
|
||
IE is in fact right, period. We are wrong. The DOM2 HTML candidate rec has an
error (and this error will be fixed now that you have pointed it out; thank you).
Nominating this. This is going to come up more and more, I think, and should
not be so hard to fix.
Keywords: nsbeta1
![]() |
Assignee | |
Comment 19•23 years ago
|
||
Comment 20•23 years ago
|
||
Comment on attachment 93638 [details] [diff] [review]
This should fix it
Need to rename formControl to isFormControl now that it's a bool.
Pity our plugin interface doesn't support name/value submission.
r=jkeiser
Attachment #93638 -
Flags: review+
![]() |
Assignee | |
Comment 21•23 years ago
|
||
Attachment #93638 -
Attachment is obsolete: true
![]() |
Assignee | |
Comment 22•23 years ago
|
||
taking
Assignee: jkeiser → bzbarsky
Priority: -- → P1
Summary: <object>'s not included in form.elements → [FIX]<object>'s not included in form.elements
Target Milestone: --- → mozilla1.1alpha
![]() |
Assignee | |
Comment 23•23 years ago
|
||
Comment on attachment 93653 [details] [diff] [review]
Patch with isFormControl
rolling r=jkeiser
Attachment #93653 -
Flags: review+
I think 1.2alpha is more appropriate milestone.
Comment 25•23 years ago
|
||
Comment on attachment 93653 [details] [diff] [review]
Patch with isFormControl
Not directly related to this patch, but it looks like NS_FORM_NOTSET is defined
in nsIFormControl but it's never used, so do you mind removing that while
you're at it? And NS_FORM_NOTOK is defined too, but isn't used for anything
useful, so that could be removed and the users replaced with NS_ERROR_FAILURE
or somesuch. If you want to file a new bug for this that's ok too.
Hmm, I wonder why nsGenericHTML*FormElement's destructor doesn't do the
SetForm(nsnull) for us? Seems silly to have to sprincle those calls in all
classes that inherit...
sr=jst
Attachment #93653 -
Flags: superreview+
![]() |
Assignee | |
Comment 26•23 years ago
|
||
New bug 161243 filed on those other issues. This patch checked in.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 27•22 years ago
|
||
*** Bug 165498 has been marked as a duplicate of this bug. ***
You need to log in
before you can comment on or make changes to this bug.
Description
•