Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 346065

Summary: [Combo] Selection can sometimes not be changed with key up/down in FF4
Product: [RT] RAP Reporter: Tim Buschtoens <tbuschto>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: tbuschto
Version: 1.4   
Target Milestone: 1.5 M1   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
partial fix tbuschto: review?

Description Tim Buschtoens CLA 2011-05-17 06:21:09 EDT
To reproduce, go to Combo tab in the controls demo wiht Firefox 4. Try to use the up/down keys to change the selection on any of the combos on the left - it wont work. However, on the combos on the right (e.g. Cursor) it will work. Also in any other browser all combos work.
Comment 1 Tim Buschtoens CLA 2011-05-17 06:23:04 EDT
Note: keys left/right work ok.
Comment 2 Ivan Furnadjiev CLA 2011-05-17 08:06:48 EDT
If you make the combos on the left read only (check the READ_ONLY checkbox) that up/down keys become to work again.
Comment 3 Tim Buschtoens CLA 2011-05-17 10:03:46 EDT
The problem seems to be that while the textfield widget is not focused in this scenario, the actual html-element still is, and it seems it now consumes the needed event (what it didnt do in FF3.6). The solution would be to properly blur the element.
Comment 4 Tim Buschtoens CLA 2011-05-17 11:12:32 EDT
Created attachment 195873 [details]
partial fix

This fixes the focus issue when the list is visible, however the problem remains when there is currently no list visible. (So: editable combo + focus + no dropdown => up/down doesnt work.) To fix that the keyDown and keyPress listener in Combo would have to be refactored or merged, and thats not a trivial task since i'm not aware of why both are used.
Comment 5 Ivan Furnadjiev CLA 2011-06-03 03:26:30 EDT
(In reply to comment #3)
I can confirm this. In FF4 the html input element inside a div does not propagate the keypress event to the div for specific keys like Up/Down/PgUp/PgDown. I don't remember why both keyDown and keyPress listeners are used in Combo too. Will try to move the Up/Down/PgUp/PgDown handling in keyDown event.
Comment 6 Ivan Furnadjiev CLA 2011-06-03 06:36:23 EDT
Fixed in CVS HEAD by moving the Up/Down/PgUp/PgDown handling in keyDown event. JS test added.