Commit 4a6bfb77 authored by deepak.m1's avatar deepak.m1 Committed by Commit bot

Bookmarked URL gets open in New tab, on pressing enter key for 'Folders' dropdown.

When we select enter key then open item is getting called and it opens last focused item.
This is due to 2 reasons:
1) getSelectedBookmarkNodes() returns bmm.list.selectedItems even when document.activeElement
is 'Folders' or 'Organize' button.
2) openItem() is for opening the item in the list, for that bmm.list should be currently active

Check have been added so that when we have bmm.list is active then only e.canExecute will become true.

BUG=452853

Review URL: https://codereview.chromium.org/1058533006

Cr-Commit-Position: refs/heads/master@{#325426}
parent 62b271de
...@@ -635,7 +635,7 @@ function canExecuteForList(e) { ...@@ -635,7 +635,7 @@ function canExecuteForList(e) {
break; break;
case 'open-in-same-window-command': case 'open-in-same-window-command':
e.canExecute = hasSelected(); e.canExecute = (e.target == bmm.list) && hasSelected();
break; break;
default: default:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment