Closed
Bug 16879
Opened 25 years ago
Closed 25 years ago
select.options.length should be read/write.
Categories
(Core :: Layout: Form Controls, defect, P3)
Core
Layout: Form Controls
Tracking
()
VERIFIED
FIXED
M14
People
(Reporter: dbaron, Assigned: pollmann)
References
()
Details
(Whiteboard: Fix in hand, need approval (see bug 12513))
Attachments
(1 file)
(deleted),
text/html
|
Details |
DESCRIPTION: I really don't know what the bug is here, but since there's no
JS error reported (there used to be, I think), I'm filing this on HTML Form
Controls. The bugzilla query page has a bit of JS code that dynamically changes
the "Component" list when a "Product" is selected. Right now, that code is
taking up about 4 seconds of processor time, and doing nothing. It should be
faster and it should work.
STEPS TO REPRODUCE:
* Load http://bugzilla.mozilla.org/query.cgi
* Select "Browser" in the "Prodct" listbox
ACTUAL RESULTS:
* 4 seconds later, "Browser" is highlighted
* The "Component" list is unchanged.
EXPECTED RESULTS:
* the component list should change (many of the components should be taken
out)
* "Browser" should be highlighted faster since the whole thing shouldn't take
so long.
DOES NOT WORK CORRECTLY ON:
* Linux, apprunner, 1999-10-19-08-M11
* Linux, viewer, 1999-10-
19-08-M11
WORKS CORRECTLY ON:
* NN 4.61 Linux
Updated•25 years ago
|
Assignee: karnaze → pollmann
Comment 1•25 years ago
|
||
Reassigning to Eric.
Assignee | ||
Updated•25 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•25 years ago
|
||
Two problems with this.
1) The following line is used to remove all options from a select. This has no
effect in gecko:
f.component.options.length = 0;
2) The following line is used to add an option to a select. This has no effect
in gecko:
f.component[l] = new Option(c, c);
Adding an option by setting f.component.option[l] works, so 2) should be easy to
fix.
Attaching a simplified test case...
Assignee | ||
Updated•25 years ago
|
OS: Linux → All
Hardware: PC → All
Target Milestone: M11
Assignee | ||
Comment 3•25 years ago
|
||
Assignee | ||
Comment 4•25 years ago
|
||
Note that this testcase won't work in Nav because I added some dump() calls to
trace execution. It should work like this in Gecko:
Clicking on "Browser" in products listbox adds "Autofill" to the components
listbox. Clicking on "Calendar" in the products adds "Core" to the components
listbox. There should be not duplicates in the components listbox.
Reporter | ||
Comment 5•25 years ago
|
||
See also bug 12513 - the DOM issues there are basically the reverse of (2).
Assignee | ||
Updated•25 years ago
|
Target Milestone: M11 → M12
Assignee | ||
Comment 6•25 years ago
|
||
I've got a 90% fix for this done in my tree. It involved creating a new content
object type, nsHTMLOptionCollection, that derived from nsHTMLGenericCollection.
I added the ability to set length, and selected index to objects of this type.
Still in a testing phase, so I'm not going to force this in to M11
(non-critical).
Comment 7•25 years ago
|
||
Adding an element using add() does not appear to work (build 1999110313). I am
not sure if this should be a new bug. The following URL steps through the
process, and the process halts upon executing the add() instruction with no
error generated.
URL: http://worldzone.net/misc/lesch/main.html
Assignee | ||
Updated•25 years ago
|
Target Milestone: M12 → M14
Assignee | ||
Comment 8•25 years ago
|
||
This fix causes massive performance problems on Bugzilla query page. (Where the
version name listbox is dynamically updated to match selected products) It took
me 120 sec to open on my P166/64M/NT box whereas without my fix it took 2
seconds. I'm holding off on checking this in for that reason! :) Marking this
M14 as it is a Backwards compatability/non-critical issue.
Reporter | ||
Comment 9•25 years ago
|
||
Am I correct to think that the performance problems don't occur if you remove
the JS from the Bugzilla query page?
Assignee | ||
Comment 10•25 years ago
|
||
Yes, it is caused by the JS, which currently removes something like 130 options
from one select, then reinserts them one at a time. We reframe the entire
select box for each of these removals and insertions, which is the real problem.
Comment 11•25 years ago
|
||
QA Contact update.
Assignee | ||
Comment 12•25 years ago
|
||
*** Bug 21431 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 13•25 years ago
|
||
*** Bug 23535 has been marked as a duplicate of this bug. ***
Reporter | ||
Comment 14•25 years ago
|
||
Is there a bug for the performance problems holding up this bug?
Assignee | ||
Comment 15•25 years ago
|
||
No, I don't think so. I'll try to re-add the changes to my tree to verify that
there is indeed still a performance problem.
Assignee | ||
Comment 16•25 years ago
|
||
*** Bug 20875 has been marked as a duplicate of this bug. ***
Comment 18•25 years ago
|
||
In this comment it says:
------
1) The following line is used to remove all options from a select. This has no
effect in gecko:
f.component.options.length = 0;
------
When this bug is fixed, will this part work in Gecko? This is needed for
backwards compatibility with NS 4.x
Assignee | ||
Comment 19•25 years ago
|
||
Yes.
Comment 20•25 years ago
|
||
*** Bug 24724 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 21•25 years ago
|
||
Updating summary.
Summary: Select element DOM modifications not working → select.options.length should be read/write.
Comment 22•25 years ago
|
||
*** Bug 26764 has been marked as a duplicate of this bug. ***
Updated•25 years ago
|
Whiteboard: ckritzer
Comment 23•25 years ago
|
||
*** Bug 27518 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 24•25 years ago
|
||
See bug 12513
Whiteboard: ckritzer → Fix in hand, need review / approval (see bug 12513)
Assignee | ||
Comment 25•25 years ago
|
||
Got a review from Vidur for this yesterday.
Whiteboard: Fix in hand, need review / approval (see bug 12513) → Fix in hand, need approval (see bug 12513)
Assignee | ||
Comment 26•25 years ago
|
||
Just checked in the fix (part of fix for 12513)
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Comment 27•25 years ago
|
||
Marking VERIFIED FIXED on:
- Linux6 2000-03-01-13 Commercial build
- MacOS9 2000-03-01-13 Commercial build
- Win98 2000-03-01-16 Commercial build
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•