Bug 762799 - Cannot open bookmark from sidebar with keyboard (with Enter key). r=mak
authorAsaf Romano <mano@mozilla.com>
Thu, 28 Jun 2012 21:24:44 +0300
changeset 97866 6fd744aca078097b05e9868cd111234ad1f565b3
parent 97865 93aa6874678d533a1a6fe9efb075dfade62b3e01
child 97867 23d9d354236ec99b1111462ef5f98c69d119710a
push id11262
push useraromano@mozilla.com
push dateThu, 28 Jun 2012 18:24:53 +0000
treeherdermozilla-inbound@6fd744aca078 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmak
bugs762799
milestone16.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 762799 - Cannot open bookmark from sidebar with keyboard (with Enter key). r=mak
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) {