Open Bug 363216 Opened 19 years ago Updated 3 years ago

can't focus on listbox with keyboard after calling selectItem(-1)

Categories

(Toolkit :: UI Widgets, defect)

x86
All
defect

Tracking

()

UNCONFIRMED

People

(Reporter: ori, Unassigned)

Details

Attachments

(2 files)

721 bytes, application/vnd.mozilla.xul+xml
Details
723 bytes, application/vnd.mozilla.xul+xml
Details
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9a1) Gecko/20061208 Minefield/3.0a1 Build Identifier: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9a1) Gecko/20061208 Minefield/3.0a1 After clearing out the listbox's selection using selectItem(-1), it cannot be selected again with the keyboard. Reproducible: Always Steps to Reproduce: In the testcase: 1. Click on "Clear all" 2. Press shift-tab Actual Results: The listbox is not selected. An exception is printed to the error console: Error: uncaught exception: [Exception... "Could not convert JavaScript argument" nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)" location: "JS frame :: chrome://global/content/bindings/listbox.xml :: getIndexOfItem :: line 474" data: no] Expected Results: The list should be focused on the first item.
Attached file Test-case
The actual bug here is that selectItem(-1) does anything. It should throw an exception. The correct syntax is selectItem(null)
If so, the "correct" selectItem(null) doesn't have any effect at all. See attached test-case.
Severity: minor → S4
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: