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

Unified Diff: chrome/browser/resources/bookmark_manager/js/main.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: implemented review comment Created 6 years, 4 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: chrome/browser/resources/bookmark_manager/js/main.js
diff --git a/chrome/browser/resources/bookmark_manager/js/main.js b/chrome/browser/resources/bookmark_manager/js/main.js
index 079bc8ebe4a2f9fe5ed7653e0808e0d4182665f8..d82df46d061edf6801f0e4cb9093af5dbced223f 100644
--- a/chrome/browser/resources/bookmark_manager/js/main.js
+++ b/chrome/browser/resources/bookmark_manager/js/main.js
@@ -239,6 +239,15 @@ function processHash() {
// Activate is handled by the open-in-same-window-command.
function handleDoubleClickForList(e) {
+ var target = e.target;
+ target = list.getListItemAncestor(target);
+
+ var index = target ? list.getIndexOfListItem(target) : -1;
+ var sm = list.selectionModel;
+ var indexSelected = sm.getIndexSelected(index);
+ if (!indexSelected)
arv (Not doing code reviews) 2014/09/02 17:17:32 index 0 is also a valid index.
b.rout 2014/09/03 09:01:13 right, index 0 is a valid index. But, getIndexSele
arv (Not doing code reviews) 2014/09/04 15:19:20 You are right. I was not reading this thoroughly.
+ list.handlePointerDownUp_(e);
arv (Not doing code reviews) 2014/09/02 17:17:32 This does not seem like the correct fix. The list
b.rout 2014/09/03 09:01:13 There is already a dblclick listener in the cr/ui/
arv (Not doing code reviews) 2014/09/04 15:19:20 I would prefer that this is handled in list. A Ctr
b.rout 2014/09/05 09:16:53 Done.
+
if (e.button == 0)
$('open-in-same-window-command').execute();
}
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698