From search field, Down key selects first result but doesn't focus it

Bug #426232 reported by Matthew Paul Thomas
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
gtk+2.0 (Ubuntu)
Invalid
Undecided
Unassigned
software-center (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Binary package hint: software-store

software-store trunk r181, Ubuntu Karmic

1. Launch the Store.
2. In the search field, enter some text that returns results, e.g. "sol".
3. Press the Down key.
4. Press the Down key again.

What happens:
3. The first result is selected, but not focused.
4. The first result is focused.

What should happen:
3. The first result is both selected and focused.

"Whenever the insertion point (caret) is at the trailing end of the search field, pressing the Down arrow key should focus the search results screen and select the first result." <https://wiki.ubuntu.com/SoftwareStore#Search%20field>

Tags: bitesize
Revision history for this message
Michael Vogt (mvo) wrote :

This appears to be standard gtk behaviour for treeviews. Do we really want to behave differently in this particular app from most other gtk apps? I attached a small example program that shows that default behaviour.

Changed in software-store (Ubuntu):
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Michael Vogt (mvo) wrote :
Revision history for this message
Matthew Paul Thomas (mpt) wrote :

Thanks for that example, Michael. I guess the standard GTK behavior should be changed: it doesn't make sense to have two different focused appearances that are functionally identical. (The same thing happens if you press Enter in either state.)

If themes want to show that a tree view is focused, they should do that with a focus ring, just like they do for text fields.

Changed in gtk+2.0 (Ubuntu):
status: New → Invalid
Revision history for this message
Matthew Paul Thomas (mpt) wrote :

Actually, sorry, I was confused. This is still a bug in the Store.

What I'm asking for here is additional behavior, specific to the case where "the insertion point (caret) is at the trailing end of the search field". The Store should focus the search results pane (however GTK does it), and should *also* actively select the first result.

This is not standard behavior for text fields, it should not be standard behavior for treeviews, and it shouldn't even be standard behavior for package list views in the Store. (For example, it shouldn't happen if you tab to the search results pane.) But I think it is appropriate extra behavior for the specific case of the down arrow key at the end of the search field, because it makes keyboard navigation for the search results more consistent with keyboard navigation for an autocomplete menu in a Web browser.

Revision history for this message
Olivier Tilloy (osomon) wrote :

Is this bug still valid? I can't reproduce with software center 2.0.2.
Whenever the search results list is updated, the first item is always selected, regardless of keyboard navigation. Pressing the down key gives the focus to the first item that was already selected.

Revision history for this message
Matthew Paul Thomas (mpt) wrote :

That is still incorrect behavior. <https://wiki.ubuntu.com/SoftwareCenter#software-list-view>: "By default, none of the rows in a software list view should be selected … If no item is selected, pressing the Down arrow key should select the first row, and conversely pressing the Up arrow key should select the last row."

Andrew (and471)
Changed in software-center (Ubuntu):
status: Confirmed → Fix Committed
Andrew (and471)
Changed in software-center (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.