Currently, we more or less retain the default keyboard behavior for an autocomplete results widget in desktop Firefox: - Press the down arrow to jump into the autocomplete results. - Keep pressing the down arrow to step to the next item in the autocomplete results. Given that the autocomplete results appear above the urlbar, we should probably change up the interaction. Yuan, how should the keyboard arrow keys work with the urlbar and autocomplete?
Created attachment 804791 [details] [diff] [review] Patch v1 With this patch the first press on the the up arrow key will act like the down key today, selecting the top left item in the autocomplete grid. To go to other items the user has to press down though, pressing up will put the focus back on the url edit box. Left and right will move the cursor within the textbox. Other option would be to select the last item in the grid, which would be in the "search for" grid. This would enable to cycle through every item just with the up arrow. I went with the former because I'd guess that "your results" will be used more often.
Comment on attachment 804791 [details] [diff] [review] Patch v1 Cancelling review for now, it's acting up when "your results" is empty.
Created attachment 804811 [details] [diff] [review] Patch v2 Working better when "your results" is empty. Part of what got me confused was actually bug 916383. The up arrow starts at the top/left item and it cycles through just fine now.
Created attachment 806311 [details] [diff] [review] Test Test bug. Urlbar tests were aggressively closing tabs, did a small fix to make it open the tabs it was closing.