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

Side by Side Diff: chrome/browser/resources/md_bookmarks/item.js

Issue 2972773003: MD Bookmarks: Always select targeted item during doubleclick (Closed)
Patch Set: Created 3 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/test/data/webui/md_bookmarks/item_test.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 Polymer({ 5 Polymer({
6 is: 'bookmarks-item', 6 is: 'bookmarks-item',
7 7
8 behaviors: [ 8 behaviors: [
9 bookmarks.MouseFocusBehavior, 9 bookmarks.MouseFocusBehavior,
10 bookmarks.StoreClient, 10 bookmarks.StoreClient,
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 } 141 }
142 e.stopPropagation(); 142 e.stopPropagation();
143 e.preventDefault(); 143 e.preventDefault();
144 }, 144 },
145 145
146 /** 146 /**
147 * @param {MouseEvent} e 147 * @param {MouseEvent} e
148 * @private 148 * @private
149 */ 149 */
150 onDblClick_: function(e) { 150 onDblClick_: function(e) {
151 if (!this.isSelectedItem_)
152 this.selectThisItem_();
calamity 2017/07/06 08:08:58 nit: newline
tsergeant 2017/07/06 08:23:22 Done.
151 var commandManager = bookmarks.CommandManager.getInstance(); 153 var commandManager = bookmarks.CommandManager.getInstance();
152 var itemSet = this.getState().selection.items; 154 var itemSet = this.getState().selection.items;
153 if (commandManager.canExecute(Command.OPEN, itemSet)) 155 if (commandManager.canExecute(Command.OPEN, itemSet))
154 commandManager.handle(Command.OPEN, itemSet); 156 commandManager.handle(Command.OPEN, itemSet);
155 }, 157 },
156 158
157 /** 159 /**
158 * @param {string} url 160 * @param {string} url
159 * @private 161 * @private
160 */ 162 */
161 updateFavicon_: function(url) { 163 updateFavicon_: function(url) {
162 this.$.icon.style.backgroundImage = cr.icon.getFavicon(url); 164 this.$.icon.style.backgroundImage = cr.icon.getFavicon(url);
163 }, 165 },
164 }); 166 });
OLDNEW
« no previous file with comments | « no previous file | chrome/test/data/webui/md_bookmarks/item_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698