Bug 299763 - Set Muon's initial focus to the search box
Summary: Set Muon's initial focus to the search box
Status: RESOLVED FIXED
Alias: None
Product: muon
Classification: Unclassified
Component: muon (show other bugs)
Version: unspecified
Platform: Ubuntu Packages Linux
: NOR wishlist with 20 votes (vote)
Target Milestone: ---
Assignee: Jonathan Thomas
URL:
Keywords:
: 300316 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-05-10 19:30 UTC by Ivan Popivanov
Modified: 2016-01-11 13:55 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Popivanov 2012-05-10 19:30:02 UTC
When the Muon package manager is opened, the first thing to do is usually to type in a package name. The search box however is not in-focus when the window is opened. An initial TAB is needed to get the focus there. Isn't it a good idea to have the search box focused on opening?

Thanks,
Ivan

Reproducible: Always

Steps to Reproduce:
1. Open Muon
2. Start typing
Actual Results:  
Nothing happens

Expected Results:  
Should start typing in the search box. It's needs to be focused on open.
Comment 1 Jonathan Thomas 2012-05-10 19:35:00 UTC
Doing that makes it less obvious that it is indeed a search bar, so I'm not inclined to change that.
Comment 2 Ivan Popivanov 2012-05-10 19:45:03 UTC
Thanks for the quick reply.

Isn't that what 99% of the users would do - type a package name to search for? Or is there another more common scenario which I am missing, because of the way I use package managers?

If that's the main use scenario, then the current approach requires an extra mouse click which could require switching forth and back from the mouse to the keyboard (I usually start muon by keyboard). If that happens in the most common path - it's kind of annoying.

Where is the current focus anyways, and why does it make more sense?

From what I remember, the focus in synaptic is in the search, so is in google main page. Hardly an uncommon or non-intuitive approach.

If I prepare a patch would you accept it?
Comment 3 Jonathan Thomas 2012-05-19 16:51:06 UTC
*** Bug 300316 has been marked as a duplicate of this bug. ***
Comment 4 Ilya Potapov 2012-05-26 19:54:56 UTC
Hi, Ivan! I am the author of duplicate bug. I can advice to 'tab' once after muon opens to focus on search field as temporary workaround.

Hello, Jonathan!
> Doing that makes it less obvious that it is indeed a search bar
But what is that except a search bar? If it looks like a search bar and behave like a search bar, then it probably is a search bar.
Comment 5 Aleix Pol 2016-01-11 13:55:48 UTC
Git commit 8f21836cff78f9834f9052e301363f106d5d1ded by Aleix Pol, on behalf of Carlo Vanini.
Committed on 11/01/2016 at 13:49.
Pushed by apol into branch 'master'.

add keyboard shortcut to focus search box

Add keyboard shortcut to move focus to the search box, and give it focus at startup.

If the box is hidden, e.g. by changes preview, the focus is not changed. Otherwise you could change the content of the search box without seeing it.

(if accepted, please push it for me)

REVIEW: 126709
Related: bug 312568, bug 325536

M  +10   -0    src/MainWindow.cpp
M  +1    -0    src/MainWindow.h
M  +7    -0    src/PackageModel/PackageWidget.cpp
M  +1    -0    src/PackageModel/PackageWidget.h

http://commits.kde.org/muon/8f21836cff78f9834f9052e301363f106d5d1ded