After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 131226 - Unable to select listview files with keyboard
Unable to select listview files with keyboard
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkTreeView
2.3.x
Other All
: Normal normal
: ---
Assigned To: gtktreeview-bugs
Nautilus Maintainers
AP2
: 120933 134415 149471 152665 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2004-01-12 13:35 UTC by Murray Cumming
Modified: 2011-02-04 16:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch (868 bytes, patch)
2004-01-30 12:13 UTC, padraig.obriain
needs-work Details | Review
Proposed patch (2.00 KB, patch)
2004-03-04 14:57 UTC, Narayana Pattipati
needs-work Details | Review
New patch (1.23 KB, patch)
2004-06-03 08:36 UTC, padraig.obriain
committed Details | Review

Description Murray Cumming 2004-01-12 13:35:00 UTC
In spatial mode, with the List View:

This works:
  Click on Filesystem in the top-level "Computer" window.
  Press the Down cursor key once, to move out of the treeview column title.
  Press the Down cursor key again to select the first item in the list.
This is a real selection, not just an accessibility focus indication.

This also kind of works, but is strange:
  Click on usr in the top-level FileSystem window
  Press the Down cursor key once, to move out of the treeview column title.
This time, we see a focus indication on the first item.
  Press the Down cursor key again. This time it selects (a real selection)
the 2nd item, instead of the first.
  Press the Up cursor-key to select the first item.

This does not work:
  Click on /home in the top-level FileSystem window.
  My PC has only one user, so there is only one folder there - "murrayc".
No combination of up or down cursor keys will allow me to select that item.
  The first down cursor key press moves the focus indicator out of the
treeview column title and onto the first item, but is is never really selected.

I think I've seen a similar bug report before, but I can't find it now.
Comment 1 Calum Benson 2004-01-23 16:32:29 UTC
Updating status whiteboard to reflect a11y team's assessment of priority.
Comment 2 padraig.obriain 2004-01-30 10:04:53 UTC
I am confused by the bug description. Is it that it is not possible to
select a file in a directory which contains exactly one item when
using view as list?
Comment 3 Murray Cumming 2004-01-30 10:14:52 UTC
> Is it that it is not possible to select a file in a directory which 
> contains exactly one item when using view as list?

Yes, I think this might be the one simple reproducable test case.
Comment 4 padraig.obriain 2004-01-30 11:26:58 UTC
Or pressing dDownArrow when focus is on the TreeView's column header
does not select the first row.
Comment 5 padraig.obriain 2004-01-30 12:12:59 UTC
The Treeview is nautilus has GTK_SELECTION_MULTIPLE and this causes
the first row not to be selected when focus is moved to the
GtkTreeView. It works if selection is not GTK_SELECTION_MULTIPLE.
Comment 6 padraig.obriain 2004-01-30 12:13:42 UTC
Created attachment 23894 [details] [review]
Proposed patch
Comment 7 padraig.obriain 2004-01-30 14:04:55 UTC
*** Bug 120933 has been marked as a duplicate of this bug. ***
Comment 8 Calum Benson 2004-01-30 17:38:25 UTC
Bumping down the AP status a notch, as I guess a user can always use
icon view + file properties dialog to achieve the same results as they
could in the list view (although that's obviously less convenient).
Comment 9 Calum Benson 2004-01-30 17:44:57 UTC
Bumping down the AP status a notch as I've just found a workaround--
you can select the single item by pressing Ctrl+Space when it's focused.

(And also because I guess a user could always use icon view + file
properties dialog to achieve the same results as they could in the
list view, although that's obviously less convenient.)
Comment 10 Calum Benson 2004-01-30 17:45:36 UTC
Hmm, apologies for the odd double-posting, ignore the penultimate one :)
Comment 11 Jonathan Blandford 2004-02-02 22:14:27 UTC
The reason it works like that is that it was deemed important to be
able to tab to a TreeView without altering the selection.
Comment 12 padraig.obriain 2004-02-03 09:44:03 UTC
Based on Jonathan's comment is this bug NOTABUG and it is a
documentation issue to make sure that the user knows how to select a
single row?
Comment 13 bill.haneman 2004-02-05 11:45:13 UTC
I still don't understand why the arrow keys don't allow the first item
to be selected (i.e. arrow keys should be grabbed by the treeview, as
opposed to TABs) - why would it be bad to allow that?

i.e.

tab (or arrow) to treeview-list
press down (or up) arrow again to move selection or select first item.
Comment 14 padraig.obriain 2004-02-16 16:21:39 UTC
*** Bug 134415 has been marked as a duplicate of this bug. ***
Comment 15 Matthias Clasen 2004-02-20 00:59:40 UTC
Jonathan said that he has no opinion on this issue; therefore I think
to   make progress we would need a patch that implements Bills proposal: 

1) don't change the selection when tabbing into the treeview
2) change the behaviour of arrows to select the current item, if it
isn't selected, and otherwise move the selection
Comment 16 Narayana Pattipati 2004-03-04 14:54:36 UTC
I will attach a patch which attempts to implement Bills proposal. The
patch does the following:

a) When focus in on Column Header, pressing Down arrow key selects the
first row in the treeview. Pressing Down arrow key once again selects
the next row. This works for a treeview with one or more than one row.

b) If treeview had selection (say 3rd row) before focus was moved into
Column header, pressing Down arrow key selects the row (3 rd), which
had selection before focus was moved out of treeview.

c) Behaviour of Tab and other arrow keys is unchanged.
Comment 17 Narayana Pattipati 2004-03-04 14:57:40 UTC
Created attachment 25162 [details] [review]
Proposed patch
Comment 18 Jonathan Blandford 2004-03-09 05:07:31 UTC
I'm going to try to get this in for 2.4.0.
Comment 19 Jonathan Blandford 2004-03-26 20:45:23 UTC
I don't like the behavior of that patch.  It seems to just add another magic key
sequence (down from the toolbar as opposed to C-space) and doesn't really help.
  As we don't really support navigation of controls through arrow-keys, people
won't find it on tabbing in.  I'm thinking that a better behavior may be to have
it select rows on Up/Down, even if the cursor doesn't move.

So if you have a list with one item and multi-selection set, tabbing in would
set the cursor on that item, but not select it.  Pressing up/down would select
that row (which is kind of the case w/ two items) and not move focus (like now).
 Hitting page up/page down will also select the row (which it currently does),
as will Ctrl-Space.

Does this make sense Calum?  Is it good enough?
Comment 20 Calum Benson 2004-04-22 16:07:19 UTC
I think so, although it took me a while to get my head around it :)

Would it be fair to say that we really just want a multi-selection list with a
single item to behave like a single-selection list, or is it not quite that
simple...?
Comment 21 padraig.obriain 2004-06-03 08:36:38 UTC
Created attachment 28286 [details] [review]
New patch

Patch which attempts to implement Jonathan's suggestion.
Comment 22 Elijah Newren 2004-06-19 18:45:56 UTC
Mass changing gtk+ bugs with target milestone of 2.4.2 to target 2.4.4, as
Matthias said he was trying to do himself on IRC and was asking for help with. 
If you see this message, it means I was successful at fixing the borken-ness in
bugzilla :)  Sorry for the spam; just query on this message and delete all
emails you get with this message, since there will probably be a lot.
Comment 23 bill.haneman 2004-08-25 19:43:55 UTC
what's wrong with the patch?  This bug has had its milestone changed twice since
a patch implementing Jonathan's suggestion was posted, and it's marked as
serious for accessibility.
Comment 24 Jonathan Blandford 2004-08-25 20:35:42 UTC
Sorry Bill; I haven't had a chance to go through my bugs recently.  Thanks for
the ping.  The new behavior feels pretty good. Padraig, can you commit to both
HEAD and 2.4?

Also Calum, you might be right that handling multi-selection w/ one item as
single-selection, but the number of differences is small, and encoding it as
such might be more work than its worth.
Comment 25 bill.haneman 2004-08-26 14:09:02 UTC
Fix committed to HEAD on behalf of Padraig, who is away.
Comment 26 bill.haneman 2004-08-26 15:42:15 UTC
Fix committed to gtk-2-4 branch also.
Comment 27 bill.haneman 2004-08-26 15:42:56 UTC
Thanks Jonathan!
Comment 28 Vincent Noel 2004-08-26 16:45:13 UTC
*** Bug 149471 has been marked as a duplicate of this bug. ***
Comment 29 Vincent Noel 2004-08-26 18:24:56 UTC
*** Bug 145331 has been marked as a duplicate of this bug. ***
Comment 30 padraig.obriain 2004-09-15 14:28:37 UTC
*** Bug 152665 has been marked as a duplicate of this bug. ***