Skip to content

Commit

Permalink
Handles selection on dblclick on any bookmark list item
Browse files Browse the repository at this point in the history
"ctrl + double click" acts on the highlighted/selected bookmark list items
irrespective of on which list item the action is performed. To extend this to
clicked, unhighlighted list item, invoking mouseup event handling functionality
under doubleclick event handling before command execution. mouseup event takes
care of highlighting and unhighlighting list items.

BUG=243221

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

Cr-Commit-Position: refs/heads/master@{#295021}
  • Loading branch information
b.rout authored and Commit bot committed Sep 16, 2014
1 parent e467a71 commit 1d406f4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ Bem Jones-Bey <bjonesbe@adobe.com>
Ben Karel <eschew@gmail.com>
Benjamin Jemlich <pcgod99@gmail.com>
Bernard Cafarelli <voyageur@gentoo.org>
Bhanukrushana Rout <b.rout@samsung.com>
Bobby Powers <bobbypowers@gmail.com>
Brendan Long <self@brendanlong.com>
Brian G. Merrell <bgmerrell@gmail.com>
Expand Down
12 changes: 10 additions & 2 deletions ui/webui/resources/js/cr/ui/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -467,8 +467,16 @@ cr.define('cr.ui', function() {
var target = /** @type {HTMLElement} */(e.target);

var ancestor = this.getListItemAncestor(target);
if (ancestor)
this.activateItemAtIndex(this.getIndexOfListItem(ancestor));
var index = -1;
if (ancestor) {
index = this.getIndexOfListItem(ancestor);
this.activateItemAtIndex(index);
}

var sm = this.selectionModel;
var indexSelected = sm.getIndexSelected(index);
if (!indexSelected)
this.handlePointerDownUp_(e);
},

/**
Expand Down

0 comments on commit 1d406f4

Please sign in to comment.