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

Unified Diff: chrome/browser/resources/chromeos/chromevox/cvox2/background/panel_menu.js

Issue 2350103003: Added Home, end, PageUp, PageDown support in the ChromeVox menu (Closed)
Patch Set: Updated documentation of scrollToTop and scrollToBottom Created 4 years, 3 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
« no previous file with comments | « chrome/browser/resources/chromeos/chromevox/cvox2/background/panel.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/chromeos/chromevox/cvox2/background/panel_menu.js
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/panel_menu.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/panel_menu.js
index d94914cc95c64be2f4468eed54396cf05dac01cc..50e0753d37d0643691dfd0fb5a69b4995ce4d2b5 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/panel_menu.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/panel_menu.js
@@ -169,6 +169,22 @@ PanelMenu.prototype = {
},
/**
+ * Sets the active menu item index to be 0.
+ */
+ scrollToTop: function() {
+ this.activeIndex_ = 0;
+ this.items_[this.activeIndex_].element.focus();
+ },
+
+ /**
+ * Sets the active menu item index to be the last index.
+ */
+ scrollToBottom: function() {
+ this.activeIndex_ = this.items_.length - 1;
+ this.items_[this.activeIndex_].element.focus();
+ },
+
+ /**
* Get the callback for the active menu item.
* @return {Function} The callback.
*/
« no previous file with comments | « chrome/browser/resources/chromeos/chromevox/cvox2/background/panel.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698