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

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

Issue 2972773003: MD Bookmarks: Always select targeted item during doubleclick (Closed)
Patch Set: Fix nit 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_();
153
151 var commandManager = bookmarks.CommandManager.getInstance(); 154 var commandManager = bookmarks.CommandManager.getInstance();
152 var itemSet = this.getState().selection.items; 155 var itemSet = this.getState().selection.items;
153 if (commandManager.canExecute(Command.OPEN, itemSet)) 156 if (commandManager.canExecute(Command.OPEN, itemSet))
154 commandManager.handle(Command.OPEN, itemSet); 157 commandManager.handle(Command.OPEN, itemSet);
155 }, 158 },
156 159
157 /** 160 /**
158 * @param {string} url 161 * @param {string} url
159 * @private 162 * @private
160 */ 163 */
161 updateFavicon_: function(url) { 164 updateFavicon_: function(url) {
162 this.$.icon.style.backgroundImage = cr.icon.getFavicon(url); 165 this.$.icon.style.backgroundImage = cr.icon.getFavicon(url);
163 }, 166 },
164 }); 167 });
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