Bug 17318 - Arrow keys don't work in an autocomplete list on Facebook
Summary: Arrow keys don't work in an autocomplete list on Facebook
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Evangelism (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar, NeedsReduction
Depends on:
Blocks:
 
Reported: 2008-02-11 17:02 PST by Keaton Knott
Modified: 2008-03-20 01:39 PDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Keaton Knott 2008-02-11 17:02:06 PST
When a name is entered into the Facebook search, normally in Safari, you can use the arrows to scroll through the list of names. With Webkit, you cannot.


Thanks guys...
Comment 1 Alexey Proskuryakov 2008-02-12 01:33:29 PST
I'm not sure how to reproduce this.

I entered a search for "John" at Facebook start page, and was forwarded to <http://www.facebook.com/srch.php?nm=john>. Up and down arrows scroll this results page just fine.
Comment 2 Adam Roben (:aroben) 2008-02-12 07:53:06 PST
I believe Keaton is talking about the "autocomplete" list that Facebook shows beneath the search field as you type. The list shows a list of friends whose names match the characters you've typed so far. This might only appear if you're logged into a Facebook account, however.
Comment 3 BJ Homer 2008-02-13 12:36:30 PST
Confirmed; the autocomplete list only shows up on a logged in account, as it is autocompleting from that account's friends.
Comment 4 BJ Homer 2008-02-16 22:12:37 PST
I'm seeing similar functionality in the Gmail "To" field.  Autocomplete suggestions are displayed, but the arrow keys don't change the selected option.
Comment 5 Gustav 2008-02-19 16:02:28 PST
I can confirm this problem in the newest nighly build.
Comment 6 Robert Blaut 2008-02-19 22:59:53 PST
Depending on many confirmations I've changed status of the bug to NEW. However standalone minimal test case is still needed.
Comment 7 Alexey Proskuryakov 2008-02-20 03:57:40 PST
<rdar://problem/5754272>
Comment 8 Adele Peterson 2008-02-27 09:24:05 PST
its likely that the site is listening for keypress events, which we don't send anymore for arrow keys (a change we made to match IE).
Comment 9 Mathieu Massebœuf 2008-03-09 07:13:45 PDT
I confirm the issue comes from the keypress event which don't fire anymore for arrow keys - and this is causing the problem.
Here is another example (it uses jquery) : http://www.filmdeculte.com/photo/5/Rachel-Nichols-10234.html#slide

Firefox fire keypress for arrows, but as you said IE 6 and 7 don't (and now webkit ...).

Why was that behaviour changed, was it causing issues ?
Matching IE is not a reason if it's not an issue or not against standards IMHO ;)
Many tech-aware sites use firefox features to allow richer user experience like this one.
Comment 10 Alexey Proskuryakov 2008-03-09 12:26:56 PDT
(In reply to comment #9)
> Why was that behaviour changed, was it causing issues ?

Yes.

It's clear that we are having compatibility issues either way, but our previous behavior was translating into bugs with international text input that were very hard to avoid without changing the whole model (and that we sometimes even shared with Firefox). In short, a keydown event corresponds to a low-level event that is not yet translated, and thus carries a virtual key code parameter, while keypress corresponds to a high-level character event, and carries a character code. There are no character codes for arrow keys, so we simply had to get rid of keypress events for those (previously, they carried semi-bogus codes in WebKit that weren't compatible with any other browser).

> Many tech-aware sites use firefox features to allow richer user experience like
> this one.

While it is obvious that we fixed some compatibility bugs, and obtained new ones, I think that IE's model that we now match is perfectly suitable for developing a rich UI. If you have examples for which it is inferior, I'd be very interested to hear about those!
Comment 11 Mathieu Massebœuf 2008-03-10 12:15:57 PDT
Thanks for the very clear / complete explanation !
A poste to Surfin’ Safari would be a good idea.
Seems I was missing many informations ;)
Comment 12 Gustav 2008-03-20 01:06:01 PDT
The arrow keys now work in the latest nightly. 
Comment 13 Robert Blaut 2008-03-20 01:39:43 PDT
(In reply to comment #12)
> The arrow keys now work in the latest nightly. 
> 

Confirmed also in stock Safari 3.1. So the code on facebook.com was fixed.