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

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

Issue 2947753003: [MD Bookmarks] Fix offscreen menu button activation. (Closed)
Patch Set: Created 3 years, 6 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/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

Powered by Google App Engine
This is Rietveld 408576698