Index: chrome/browser/resources/md_bookmarks/list.js |
diff --git a/chrome/browser/resources/md_bookmarks/list.js b/chrome/browser/resources/md_bookmarks/list.js |
index 0505d470682b99a8874e72f7f2e9c3b8b0c9f86a..759365583f4725995d9c1b6673c3a3f66d83ea45 100644 |
--- a/chrome/browser/resources/md_bookmarks/list.js |
+++ b/chrome/browser/resources/md_bookmarks/list.js |
@@ -137,6 +137,18 @@ Polymer({ |
return this.$.bookmarksCard.modelForElement(el).index; |
}, |
+ /** |
+ * @param {Event} e |
+ * @private |
+ */ |
+ onOpenItemMenu_: function(e) { |
+ var index = e.target.index; |
+ var list = this.$.bookmarksCard; |
+ // If the item is not visible, scroll to it before rendering the menu. |
+ if (index < list.firstVisibleIndex || index > list.lastVisibleIndex) |
+ list.scrollToIndex(index); |
+ }, |
+ |
/** |
* @param {KeyboardEvent} e |
* @private |