GNOME Bugzilla – Bug 692391
Pressing Return in empty Search field should not launch an application
Last modified: 2013-01-28 15:58:45 UTC
When starting to type in the application overview, it functions as a search query. When you remove the typed characters, using backspace, and hit Return in an empty Search field, it will still launch an application that sort of "matches" with the last character that was present in the field. I think this behaviour is incorrect. One can't really predict which application will be launched and as a result causes "random" behaviour. Instead it should just close the application overview. You ask it to do something on nothing, not on something that was. One could say that it should therefore not close the overview as well...but then you'd loose a handy shortcut ;-)
I'd like to work on fixing this.
Created attachment 234485 [details] [review] Patch to check if search entry is empty All done! With this patch, pressing enter in an empty search field will not launch an app and it will not close the overview. I believe this is the proper functionality since enter doesn't do anything else in the shell and it would be weird for it to function as a shortcut to close the overview only in the search field.
Review of attachment 234485 [details] [review]: Thanks for the patch. I'd rather move the whole if (symbol == Clutter.Return || symbol == Clutter.KP_Enter) { ... } block inside the if (this._searchActive) {} block.
Created attachment 234560 [details] [review] Patch refactor where the Clutter.Return code block is run This is a bit cleaner; good idea.
Review of attachment 234560 [details] [review]: Looks good. Do you have git access to push?
Not yet. Will you commit it for me? (Thanks, if so)
(In reply to comment #6) > Not yet. Will you commit it for me? > (Thanks, if so) Sure, you're welcome. Keep them coming :-)
Nice, a quick fix, thanks Hashem!