Bug 762799 - Cannot open bookmark from sidebar with keyboard (with Enter key). r=mak. a=gavin
authorAsaf Romano <mano@mozilla.com>
Thu, 28 Jun 2012 22:01:46 +0300
changeset 98290 c4dac534629c8130ab0d04d45148b99c445cdcec
parent 98289 2f5ede40b4f5e78d131fc9fbf040386c78499a85
child 98291 99b541bcb23afbadededda8f381f29d316bcdfbb
push id1605
push useraromano@mozilla.com
push dateThu, 28 Jun 2012 19:02:02 +0000
treeherdermozilla-aurora@c4dac534629c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmak, gavin
bugs762799
milestone15.0a2
Bug 762799 - Cannot open bookmark from sidebar with keyboard (with Enter key). r=mak. a=gavin
browser/components/places/content/sidebarUtils.js
--- a/browser/components/places/content/sidebarUtils.js
+++ b/browser/components/places/content/sidebarUtils.js
@@ -61,21 +61,21 @@ var SidebarUtils = {
       // selection as an indication of which link to load.
       tbo.view.selection.select(row.value);
       PlacesUIUtils.openNodeWithEvent(aTree.selectedNode, aEvent, aTree);
     }
   },
 
   handleTreeKeyPress: function SU_handleTreeKeyPress(aEvent) {
     // XXX Bug 627901: Post Fx4, this method should take a tree parameter.
-    let node = aEvent.target.selectedNode;
+    let tree = aEvent.target;
+    let node = tree.selectedNode;
     if (node) {
-      let view = PlacesUIUtils.getViewForNode(node);
       if (aEvent.keyCode == KeyEvent.DOM_VK_RETURN)
-        PlacesUIUtils.openNodeWithEvent(node, aEvent, view);
+        PlacesUIUtils.openNodeWithEvent(node, aEvent, tree);
     }
   },
 
   /**
    * The following function displays the URL of a node that is being
    * hovered over.
    */
   handleTreeMouseMove: function SU_handleTreeMouseMove(aEvent) {