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

Unified Diff: chrome/browser/resources/md_bookmarks/app.js

Issue 2820153003: [MD Bookmarks] Add keyboard navigation to sidebar. (Closed)
Patch Set: Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/md_bookmarks/app.js
diff --git a/chrome/browser/resources/md_bookmarks/app.js b/chrome/browser/resources/md_bookmarks/app.js
index a9723f10fae31797f346ba62140e921992fa2f1b..c50e6aabd1e2b58590607adee8c332cb655e9c4d 100644
--- a/chrome/browser/resources/md_bookmarks/app.js
+++ b/chrome/browser/resources/md_bookmarks/app.js
@@ -26,12 +26,19 @@ Polymer({
sidebarWidth_: String,
},
+ listeners: {
+ 'folder-node-focus-changed': 'onFolderNodeFocusChanged_',
+ },
+
/** @private{?function(!Event)} */
boundUpdateSidebarWidth_: null,
/** @private {bookmarks.DNDManager} */
dndManager_: null,
+ /** @private {BookmarksFolderNode} */
+ focusedFolderNode_: null,
+
/** @override */
attached: function() {
this.watch('searchTerm_', function(store) {
@@ -99,6 +106,14 @@ Polymer({
window.addEventListener('resize', this.boundUpdateSidebarWidth_);
},
+ onFolderNodeFocusChanged_: function(e) {
+ if (this.focusedFolderNode_)
+ this.focusedFolderNode_.focusable = false;
+
+ this.focusedFolderNode_ = e.detail;
+ this.focusedFolderNode_ = true;
tsergeant 2017/04/19 01:42:16 What's going on here? My guess is this was suppose
calamity 2017/04/19 04:51:02 Done.
+ },
+
/** @private */
updateSidebarWidth_: function() {
this.sidebarWidth_ =

Powered by Google App Engine
This is Rietveld 408576698