Closed
Bug 100499
Opened 23 years ago
Closed 11 years ago
Setting form control .name leaves control accessible by old name
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
INVALID
People
(Reporter: john, Unassigned)
References
(Depends on 1 open bug, )
Details
(Whiteboard: [HAVE FIX])
Attachments
(4 files, 1 obsolete file)
(deleted),
text/html
|
Details | |
(deleted),
text/html
|
Details | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review |
When you set document.mainform.x.name = "y"; and then do alert(document.mainform.x.name); it will show up as "y". This means we can still access the element by its old name. In the URL, click "name", "(set)", and then "name" again on any of the selects. The fact that the "name" succeeds illustrated the problem.
Comment 1•23 years ago
|
||
Comment 2•23 years ago
|
||
The fix for this is to simply not define form.foo when 'foo' is resolved on the form, doing that didn't really give us anything since we do the real work in ::GetProperty() in the helper. jband, sr=?
Status: NEW → ASSIGNED
OS: Linux → All
Hardware: PC → All
Whiteboard: [HAVE FIX]
Target Milestone: --- → mozilla0.9.5
Comment 3•23 years ago
|
||
Hmm, never mind, the attached patch isn't quite right.
Updated•23 years ago
|
Whiteboard: [HAVE FIX]
Comment 4•23 years ago
|
||
Comment 5•23 years ago
|
||
Comment 6•23 years ago
|
||
Updated•23 years ago
|
Whiteboard: [HAVE FIX]
Comment 7•23 years ago
|
||
jband, brendan, r/sr=?
Updated•23 years ago
|
Attachment #49884 -
Attachment is obsolete: true
Updated•23 years ago
|
Attachment #49884 -
Attachment description: Proposed fix. → Ignore this.
Comment 8•23 years ago
|
||
before checking in the patch (which looks good), would it be possible to fix the large comment so that the first sentence is easier to understand (is there a missing word?) and also the typo fomr->form. Thanks.
Comment 9•23 years ago
|
||
"the form objects prototype chain" needs an apostrophe in "objects". The MozillaClassic DOM level 0 code took no steps to remove the old name. Does IE? Just curious. Is there an alternative where you remove the old name in the setter for the name property? Might that be simpler (no anti-recursion required)? /be
Updated•23 years ago
|
Target Milestone: mozilla0.9.5 → mozilla0.9.6
Comment 10•23 years ago
|
||
Comment 11•23 years ago
|
||
Eh, hmm, ignore the above, wrong bug...
Comment 12•23 years ago
|
||
Brendan, looks like IE has the same bug. I'm actually not that worried about formcontrols being reachable by their old name, but the fact that the old name will shadow a new form control that is inserted with the old name is unfortunate. Interestingly enough, IE has the same problem. Given that, I'll move this to mozilla1.0 and we'll decide what to do later on...
Target Milestone: mozilla0.9.6 → mozilla1.0
Comment 13•23 years ago
|
||
Bugs targeted at mozilla1.0 without the mozilla1.0 keyword moved to mozilla1.0.1 (you can query for this string to delete spam or retrieve the list of bugs I've moved)
Target Milestone: mozilla1.0 → mozilla1.0.1
Updated•23 years ago
|
Priority: -- → P4
Updated•22 years ago
|
Target Milestone: mozilla1.0.1 → mozilla1.3alpha
Updated•22 years ago
|
Target Milestone: mozilla1.3alpha → mozilla1.3final
Component: DOM: HTML → DOM: Core & HTML
QA Contact: stummala → general
Updated•16 years ago
|
Assignee: general → nobody
Updated•16 years ago
|
Priority: P4 → --
Target Milestone: mozilla1.3final → ---
![]() |
||
Updated•12 years ago
|
Depends on: ParisBindings
![]() |
||
Comment 15•11 years ago
|
||
Looks like browsers interoperably do this, and the spec requires it. See the past names map.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
Updated•11 years ago
|
Resolution: WONTFIX → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•