[gnome-documents: 8/10] searchbar: don't attempt our focus hack if we have no event device



commit f45b67fc1e896ddbe1b5ef1f3efea9d8ec8c07e2
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Mon Dec 10 17:06:15 2012 -0500

    searchbar: don't attempt our focus hack if we have no event device
    
    This happens when launching the search from the Shell.

 src/searchbar.js |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/searchbar.js b/src/searchbar.js
index 3b57cc0..b50b51d 100644
--- a/src/searchbar.js
+++ b/src/searchbar.js
@@ -211,7 +211,8 @@ const Searchbar = new Lang.Class({
                                        transition: 'easeOutQuad',
                                        onComplete: function() {
                                            this._in = true;
-                                           Gd.entry_focus_hack(this._searchEntry, eventDevice);
+                                           if (eventDevice)
+                                               Gd.entry_focus_hack(this._searchEntry, eventDevice);
                                        },
                                        onCompleteScope: this });
     },



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