| 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 c14fee3a875d948df19b170085da4ecbf1dce45f..546d9ccc72d69dd9383eb0f8b84125dc412cda1f 100644
|
| --- a/chrome/browser/resources/md_bookmarks/list.js
|
| +++ b/chrome/browser/resources/md_bookmarks/list.js
|
| @@ -131,6 +131,19 @@ Polymer({
|
| return this.$.bookmarksCard.modelForElement(el).index;
|
| },
|
|
|
| + /**
|
| + * @param {Event} e
|
| + * @private
|
| + */
|
| + onOpenItemMenu_: function(e) {
|
| + var index = this.displayedIds_.indexOf(
|
| + /** @type {BookmarksItemElement} */ (e.target).itemId);
|
| + 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
|
|
|