[gnome-documents] searchbar: Fix lost keypresses when searching in fullscreen



commit 8332ecb235dce7391c6c455ba10c9f2a8f5c391f
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Dec 9 14:47:10 2015 +0100

    searchbar: Fix lost keypresses when searching in fullscreen
    
    Make the entry grab the focus when starting a search, otherwise the
    subsequent key presses will go to the view instead.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=757278

 src/searchbar.js |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/searchbar.js b/src/searchbar.js
index 296993c..25b012b 100644
--- a/src/searchbar.js
+++ b/src/searchbar.js
@@ -104,7 +104,10 @@ const Searchbar = new Lang.Class({
             return true;
         }
 
-        return this.handle_event(event);
+        let retval = this.handle_event(event);
+        if (retval == Gdk.EVENT_STOP)
+            this._searchEntry.grab_focus();
+        return retval;
     },
 
     reveal: function() {


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