| OLD | NEW |
| 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.StoreClient, | 9 bookmarks.StoreClient, |
| 10 ], | 10 ], |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 } else { | 103 } else { |
| 104 handled = false; | 104 handled = false; |
| 105 } | 105 } |
| 106 | 106 |
| 107 if (this.getComputedStyleValue('direction') == 'rtl') | 107 if (this.getComputedStyleValue('direction') == 'rtl') |
| 108 xDirection *= -1; | 108 xDirection *= -1; |
| 109 | 109 |
| 110 this.changeKeyboardSelection_( | 110 this.changeKeyboardSelection_( |
| 111 xDirection, yDirection, this.root.activeElement); | 111 xDirection, yDirection, this.root.activeElement); |
| 112 | 112 |
| 113 if (!handled) { |
| 114 handled = bookmarks.CommandManager.getInstance().handleKeyEvent( |
| 115 e, new Set([this.itemId])); |
| 116 } |
| 117 |
| 113 if (!handled) | 118 if (!handled) |
| 114 return; | 119 return; |
| 115 | 120 |
| 116 e.preventDefault(); | 121 e.preventDefault(); |
| 117 e.stopPropagation(); | 122 e.stopPropagation(); |
| 118 }, | 123 }, |
| 119 | 124 |
| 120 /** | 125 /** |
| 121 * @private | 126 * @private |
| 122 * @param {number} xDirection | 127 * @param {number} xDirection |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 }, | 340 }, |
| 336 | 341 |
| 337 /** | 342 /** |
| 338 * @private | 343 * @private |
| 339 * @return {string} | 344 * @return {string} |
| 340 */ | 345 */ |
| 341 getTabIndex_: function() { | 346 getTabIndex_: function() { |
| 342 return this.isSelectedFolder_ ? '0' : ''; | 347 return this.isSelectedFolder_ ? '0' : ''; |
| 343 }, | 348 }, |
| 344 }); | 349 }); |
| OLD | NEW |