[gnome-shell] search: fix keyboard hiding when user starts a new search



commit b9069df85c78b2f249742233ac2417ba94c9103f
Author: Nohemi Fernandez <nf68 cornell edu>
Date:   Sun Oct 9 16:24:59 2011 -0400

    search: fix keyboard hiding when user starts a new search
    
    The keyboard hides prematurely when the user is typing into
    an empty search box because the click is a captured event that
    triggers a loss of entry focus. By adding a keyboard check to
    this event, the problem is solved.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=661340

 js/ui/viewSelector.js |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/viewSelector.js b/js/ui/viewSelector.js
index 4791d0b..2e3af18 100644
--- a/js/ui/viewSelector.js
+++ b/js/ui/viewSelector.js
@@ -289,9 +289,11 @@ SearchTab.prototype = {
     _onCapturedEvent: function(actor, event) {
         if (event.type() == Clutter.EventType.BUTTON_PRESS) {
             let source = event.get_source();
-            if (source != this._text && this._text.text == '') {
+            if (source != this._text && this._text.text == '' &&
+                !Main.layoutManager.keyboardBox.contains(source)) {
                 // the user clicked outside after activating the entry, but
-                // with no search term entered - cancel the search
+                // with no search term entered and no keyboard button pressed
+                // - cancel the search
                 this._reset();
             }
         }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]