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

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: Rewrite to use a function rather than a property 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 /** @return {!HTMLElement} */
calamity 2017/06/08 03:34:18 @override
tsergeant 2017/06/08 05:03:40 Done.
73 getFocusTarget: function() { 74 getFocusTarget: function() {
74 return this.$.container; 75 return this.$.container;
75 }, 76 },
76 77
77 /** @return {HTMLElement} */ 78 /** @return {HTMLElement} */
78 getDropTarget: function() { 79 getDropTarget: function() {
79 return this.$.container; 80 return this.$.container;
80 }, 81 },
81 82
82 /** @return {boolean} */ 83 /** @return {boolean} */
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 */ 333 */
333 isRootFolder_: function() { 334 isRootFolder_: function() {
334 return this.itemId == ROOT_NODE_ID; 335 return this.itemId == ROOT_NODE_ID;
335 }, 336 },
336 337
337 /** 338 /**
338 * @private 339 * @private
339 * @return {string} 340 * @return {string}
340 */ 341 */
341 getTabIndex_: function() { 342 getTabIndex_: function() {
342 return this.isSelectedFolder_ ? '0' : ''; 343 return this.isSelectedFolder_ ? '0' : '-1';
343 }, 344 },
344 }); 345 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698