Bug 762799 - Cannot open bookmark from sidebar with keyboard (with Enter key). r=mak

This commit is contained in:
Asaf Romano 2012-06-28 21:24:44 +03:00
parent ff27438eef
commit 60717a1f5a

View File

@ -66,11 +66,11 @@ var SidebarUtils = {
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);
}
},