Bug 25051 - Optgroup in select breaks keyboard navigation.
Summary: Optgroup in select breaks keyboard navigation.
Status: RESOLVED WORKSFORME
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 528+ (Nightly build)
Hardware: Macintosh OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
: 89644 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-04-04 16:31 PDT by Alexander Ljungberg
Modified: 2014-03-05 02:05 PST (History)
11 users (show)

See Also:


Attachments
Reduced test case to demonstrate select keyboard acceleration problem. (824 bytes, text/html)
2009-04-04 16:36 PDT, Alexander Ljungberg
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Ljungberg 2009-04-04 16:31:50 PDT
When the <optgroup> tag is used, keyboard navigation does not work in a select drop down if the drop down is opened. Keyboard navigation still works if the drop down is in its closed state.

Tested on build 530.5+.

The attached test case demonstrates the problem. There are two select drop downs in the page. The first one contains an optgroup, the second one does not. Everything else is equal. To reproduce the problem:

Incorrect result:
1. Click the first drop down to bring up the popup with selections.
2. Type "I" on the keyboard.
3. The choice "Zenbe" is highlighted.

Correct result:
1. Click the second drop down bring up the popup with selections.
2. Type "I" on the keyboard.
3. The choice "Infinity Internet" is highlighted.
Comment 1 Alexander Ljungberg 2009-04-04 16:36:04 PDT
Created attachment 29258 [details]
Reduced test case to demonstrate select keyboard acceleration problem.

First select box works incorrectly, second works correctly when selecting items through typing on the keyboard with the select popup open.
Comment 2 Anthony Ricaud 2009-04-12 07:20:29 PDT
Confirmed with r42369.
Comment 3 Reid Beels 2011-02-15 15:07:46 PST
Confirmed in r78528
Comment 4 Alexander Kahn 2011-06-07 08:15:59 PDT
I think fixing this would be a great improvement. This trips me up a lot.
Comment 5 Robin Stocker 2011-06-25 13:33:02 PDT
Confirmed in Chrome 14.0.797.0 dev. Firefox behaves correctly by the way (maybe that is a motivation).
Comment 6 bugzilla 2012-01-19 01:25:32 PST
This is really annoying. Even Internet Explorer (checked with version 9) handles this correctly. That's quite embarrassing, huh? Please fix this soon! Thanks a lot!
Comment 7 Alexey Proskuryakov 2012-06-21 10:07:20 PDT
*** Bug 89644 has been marked as a duplicate of this bug. ***
Comment 8 Peter Ostrander 2013-02-13 12:33:08 PST
Experiencing this same problem across Webkit browsers. I've created a jsfiddle that displays the issue. 

http://jsfiddle.net/peterostrander/dtt9L/
Comment 9 Peter Ostrander 2013-02-13 13:31:48 PST
It also appears that this only occurs when an optgroup has nested options inside it. If optgroups are present in the select, but none of them contain nested options, then keyboard navigation works correctly.
Comment 10 fr0d0z 2013-11-21 17:19:58 PST
A workaround using jQuery can be found here:
http://stackoverflow.com/questions/8829451/bug-in-select-optgroup-using-keyboard-accelerators-in-webkit

Would love to see a fix for this though :-)
Comment 11 Benjamin Poulain 2014-03-04 22:04:30 PST
It seems to work now. I just tried with WebKit trunk on Mavericks and I can navigate when the popup is up.
Comment 12 Alexander Ljungberg 2014-03-05 02:05:29 PST
I can confirm this is resolved, even in vanilla Safari 7.0.2.