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

Unified Diff: third_party/polymer/v1_0/components-chromium/iron-list/iron-list-extracted.js

Issue 2885723002: [MD Bookmarks] Add keyboard navigation and selection to bookmark list. (Closed)
Patch Set: Created 3 years, 7 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: third_party/polymer/v1_0/components-chromium/iron-list/iron-list-extracted.js
diff --git a/third_party/polymer/v1_0/components-chromium/iron-list/iron-list-extracted.js b/third_party/polymer/v1_0/components-chromium/iron-list/iron-list-extracted.js
index c9e0a9fd5330f9f791ccf274c40de7197965a2e5..5d04e7e9db8cfa09d4b94bf156b373757d0179b3 100644
--- a/third_party/polymer/v1_0/components-chromium/iron-list/iron-list-extracted.js
+++ b/third_party/polymer/v1_0/components-chromium/iron-list/iron-list-extracted.js
@@ -1466,7 +1466,7 @@
return this._physicalIndexForKey[this._collection.getKey(this._getNormalizedItem(idx))];
},
- _focusPhysicalItem: function(idx) {
+ focusPhysicalItem: function(idx) {
if (idx < 0 || idx >= this._virtualCount) {
return;
}
@@ -1592,19 +1592,27 @@
},
_didMoveUp: function() {
- this._focusPhysicalItem(this._focusedIndex - 1);
+ this.focusPhysicalItem(this._focusedIndex - 1);
},
_didMoveDown: function(e) {
// disable scroll when pressing the down key
e.detail.keyboardEvent.preventDefault();
- this._focusPhysicalItem(this._focusedIndex + 1);
+ this.focusPhysicalItem(this._focusedIndex + 1);
},
_didEnter: function(e) {
- this._focusPhysicalItem(this._focusedIndex);
+ this.focusPhysicalItem(this._focusedIndex);
this._selectionHandler(e.detail.keyboardEvent);
- }
+ },
+
+ getFocusedIndex: function() {
+ return this._focusedIndex;
+ },
+
+ getFocusedItem: function() {
+ return this._focusedItem;
+ },
});
-})();
+})();

Powered by Google App Engine
This is Rietveld 408576698