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

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

Issue 2920413002: MD Bookmarks: Focus sidebar nodes on click without showing an outline (Closed)
Patch Set: Review comments Created 3 years, 6 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
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-folder-node', 6 is: 'bookmarks-folder-node',
7 7
8 behaviors: [ 8 behaviors: [
9 bookmarks.MouseFocusBehavior,
9 bookmarks.StoreClient, 10 bookmarks.StoreClient,
10 ], 11 ],
11 12
12 properties: { 13 properties: {
13 itemId: { 14 itemId: {
14 type: String, 15 type: String,
15 observer: 'updateFromStore', 16 observer: 'updateFromStore',
16 }, 17 },
17 18
18 depth: { 19 depth: {
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 63
63 this.updateFromStore(); 64 this.updateFromStore();
64 65
65 if (this.isSelectedFolder_) { 66 if (this.isSelectedFolder_) {
66 this.async(function() { 67 this.async(function() {
67 this.scrollIntoViewIfNeeded(); 68 this.scrollIntoViewIfNeeded();
68 }); 69 });
69 } 70 }
70 }, 71 },
71 72
72 /** @return {HTMLElement} */ 73 /**
74 * @return {!HTMLElement}
75 * @private
calamity 2017/06/08 05:07:11 lol. @private != @override
tsergeant 2017/06/08 05:16:30 Oh geez, my brain is running on autopilot a little
76 */
73 getFocusTarget: function() { 77 getFocusTarget: function() {
74 return this.$.container; 78 return this.$.container;
75 }, 79 },
76 80
77 /** @return {HTMLElement} */ 81 /** @return {HTMLElement} */
78 getDropTarget: function() { 82 getDropTarget: function() {
79 return this.$.container; 83 return this.$.container;
80 }, 84 },
81 85
82 /** @return {boolean} */ 86 /** @return {boolean} */
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 */ 341 */
338 isRootFolder_: function() { 342 isRootFolder_: function() {
339 return this.itemId == ROOT_NODE_ID; 343 return this.itemId == ROOT_NODE_ID;
340 }, 344 },
341 345
342 /** 346 /**
343 * @private 347 * @private
344 * @return {string} 348 * @return {string}
345 */ 349 */
346 getTabIndex_: function() { 350 getTabIndex_: function() {
347 return this.isSelectedFolder_ ? '0' : ''; 351 return this.isSelectedFolder_ ? '0' : '-1';
348 }, 352 },
349 }); 353 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_bookmarks/folder_node.html ('k') | chrome/browser/resources/md_bookmarks/item.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698