Checking for commandline focus before doing dashboard navigation with
authorEvan Allrich <eallrich@gmail.com>
Fri, 10 Apr 2009 13:16:48 -0500
changeset 1075 437b28e51750a168c9ca024bb7d897d9280e9cf3
parent 1071 0bcf8138c7f4eb15670b0f54060d0b88353a6305
child 1076 27403fea2c1c3505f0c6beeac33d814754a20d0f
push id564
push userdalmaer@mozilla.com
push dateSat, 11 Apr 2009 04:27:09 +0000
Checking for commandline focus before doing dashboard navigation with keys
frontend/js/bespin/page/dashboard/init.js
--- a/frontend/js/bespin/page/dashboard/init.js
+++ b/frontend/js/bespin/page/dashboard/init.js
@@ -394,16 +394,19 @@ dojo.provide("bespin.page.dashboard.init
         // provide history for the dashboard
         bespin.subscribe("url:changed", function(e) {
             var pathSelected =  (new bespin.client.settings.URL()).get('path');
             bespin.page.dashboard.restorePath(pathSelected);
         });
         
         // provide arrow navigation to dashboard
         dojo.connect(window, "keydown", dojo.hitch(tree, function(e) {
+            // catch focus on commandline
+            if(commandLine.handleCommandLineFocus(e)) return false;
+
             var key = bespin.util.keys.Key;
             var path = this.getSelectedPath();
             // things to make life much more easy :)
             var index = path.length - 1;
             var list = this.lists[index];
             var listNext = (this.lists.length > index ? this.lists[index + 1] : false);
             var listPre = (index != 0 ? this.lists[index - 1] : false);
             
@@ -433,9 +436,9 @@ dojo.provide("bespin.page.dashboard.init
                     this.bus.fire("dblclick", e, tree);
                     break;
             }
         }));
         
         // Set up message retrieval
         server.processMessages();
     });
-})();
\ No newline at end of file
+})();