Bookmark manager: Handle "copy", "cut"and "paste" events only when list or tree pane active.

This caused by a change of getSelectedBookmarkNodes() in r172230. Before r177230, getSelectedBookmarkNodes() threw error unless list or tree is active. From r177230, getSelectedBookmarkNodes() returns selected items of list when list nor tree is active.

Note: For a11y, when context menu or organize menu is open, menu takes focus. So, list/tree is no more active element when menu is opened.

This causes "cut" event handler of document object does "cut" operation on an active item of list. In bug case, an active item is editing bookmark.

This patch changes to check active element in "copy", "cut", and "paste" event handler.

BUG=174613
TEST=On bookmark manager, edit/rename bookmark/folder and hit Ctrl+X in edit field.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@186312 0039d316-1c4b-4281-b951-d872f2087c98
1 file changed