Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(881)

Unified Diff: ui/webui/resources/js/cr/ui/list.js

Issue 515853002: "ctrl + double click" acts on the highlighted/selected bookmark list items irrespective of on which… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: put the implementation in dblclick event handler in list.js Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/webui/resources/js/cr/ui/list.js
diff --git a/ui/webui/resources/js/cr/ui/list.js b/ui/webui/resources/js/cr/ui/list.js
index 4fc97ba510614ef5b39a9b931a7a5a0a7b74ed16..72cf7c52e3b9cf6c2f2ce9d65b69ecf838716c09 100644
--- a/ui/webui/resources/js/cr/ui/list.js
+++ b/ui/webui/resources/js/cr/ui/list.js
@@ -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);
},
/**
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698