Closed Bug 12238 Opened 25 years ago Closed 25 years ago

GFX select widget: clear and refill items does not update display

Categories

(Core :: XUL, defect, P3)

defect

Tracking

()

VERIFIED FIXED

People

(Reporter: alecf, Assigned: rods)

Details

(Whiteboard: [TESTCASE])

Attachments

(1 file)

I'm clearning a select widget like this: while (combo.length != 0) { comp.remove(0); } Then I'm refilling it with new values: var opt1=new Option("is", "is"); var opt2=new Option("is greather than", "greater"); combo.add(opt1); combo.add(opt2); The problem is that the old selected item that was there before I cleared the widget isn't being cleared out... though when I pull down the dropdown for the widget, all the new options are there. This is a pretty common operation to do on a combo box, and I'd imagine this would affect alot of web developers, not just us!
oh, an odd little behavioral update: if I have previously selected , say, the second item in the widget, then do the clear-and-refill operation describe above, then click to dropdown the list of choices: 1) No items are highlighted (which makes sense, since the currently displayed item is not in the list) 2) if I select the second item (i.e. same position as the old selected item) then the select widget itself does not change - I'm guessing it thinks that I'm selecting the same item over again based on the index. When the clear-and-refill operation happens, I believe it should select the first item, or no items at all.
Status: NEW → ASSIGNED
Have I ever said how much I hate the combobox? Thanks for the detailed description, you are right it works off the index, I need to clear it when things get removed. I also need to clear the display area when the selected item is removed. I'll work on that right away.
phillip...linux only?
Hardware: PC → All
No, it's all platforms
OS: Linux → All
adding kevin because he said he wanted to know about all the GFX blockers.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Fixed for GFX
Attached file html testcase (deleted) —
Status: RESOLVED → VERIFIED
Whiteboard: [TESTCASE]
i added a new testcase. if there are 4 options, or there are only 2 but they are not labled 'is' and 'is greater than' the bug is back. it is fixed on 1999-08-27-05-M10 RedHat Linux 6.0 (GNOME/enlightenment) 1999-08-27-09-M10 WinNT 4.0 sp5 1999-08-27-12-M10 MacOS 8.51 for both gfx and native widgets!
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: