[gnome-shell] Fix search handling when typing multiple searches in the search box
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] Fix search handling when typing multiple searches in the search box
- Date: Fri, 15 Apr 2011 17:47:25 +0000 (UTC)
commit 35c85d9faca4a5906ba583c5a3f60201813607c6
Author: Nohemi Fernandez <nf68 cornell edu>
Date: Thu Apr 7 19:10:24 2011 -0400
Fix search handling when typing multiple searches in the search box
In the current implementation of the search entry, when replacing a
selected search term with another term, the first character of the
replacement is prepended to the hint text rather than starting a new
search. This fix makes sure that the focus is not lost when changing
the selected search term.
https://bugzilla.gnome.org/show_bug.cgi?id=636341
js/ui/viewSelector.js | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/viewSelector.js b/js/ui/viewSelector.js
index 00ec8a4..29262dc 100644
--- a/js/ui/viewSelector.js
+++ b/js/ui/viewSelector.js
@@ -162,7 +162,14 @@ SearchTab.prototype = {
hide: function() {
BaseTab.prototype.hide.call(this);
- this._reset();
+ // Leave the entry focused when it doesn't have any text;
+ // when replacing a selected search term, Clutter emits
+ // two 'text-changed' signals, one for deleting the previous
+ // text and one for the new one - the second one is handled
+ // incorrectly when we remove focus
+ // (https://bugzilla.gnome.org/show_bug.cgi?id=636341) */
+ if (this._text.text != '')
+ this._reset();
},
_reset: function () {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]