[the-board] [ui] Move focus on main box when toolbar is deactivated



commit 9423a4cf3c67a36256c5540c3500f298f772af5c
Author: Lucas Rocha <lucasr gnome org>
Date:   Tue Dec 7 23:33:31 2010 +0000

    [ui] Move focus on main box when toolbar is deactivated

 src/js/ui/mainWindow.js |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/js/ui/mainWindow.js b/src/js/ui/mainWindow.js
index a42b480..40a414e 100644
--- a/src/js/ui/mainWindow.js
+++ b/src/js/ui/mainWindow.js
@@ -652,8 +652,14 @@ MainWindow.prototype = {
     },
 
     _onToolbarActiveChanged : function() {
-        if (this._currentPage && this._activeToolbar.active) {
+        if (!this._currentPage) {
+            return;
+        }
+
+        if (this._activeToolbar.active) {
             this._currentPage.setActiveThing(null);
+        } else {
+            this._mainBox.grab_key_focus();
         }
     },
 



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