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

Unified Diff: chrome/browser/resources/chromeos/chromevox/cvox2/background/panel.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 | « no previous file | chrome/browser/resources/chromeos/chromevox/cvox2/background/panel_menu.js » ('j') | 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.js
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/panel.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/panel.js
index a93365a55959d9d397e033bc80388b1dad1906a3..60133570e9f67c0957f4b0783c87f0aa401343a4 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/panel.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/panel.js
@@ -443,6 +443,20 @@ Panel.activateMenu = function(menu) {
};
/**
+ * Sets the index of the current active menu to be 0.
+ */
+Panel.scrollToTop = function() {
+ this.activeMenu_.scrollToTop();
+};
+
+/**
+ * Sets the index of the current active menu to be the last index.
+ */
+Panel.scrollToBottom = function() {
+ this.activeMenu_.scrollToBottom();
+};
+
+/**
* Advance the index of the current active menu by |delta|.
* @param {number} delta The number to add to the active menu index.
*/
@@ -530,6 +544,18 @@ Panel.onKeyDown = function(event) {
case 'Escape':
Panel.closeMenusAndRestoreFocus();
break;
+ case 'PageUp':
+ Panel.advanceItemBy(10);
+ break;
+ case 'PageDown':
+ Panel.advanceItemBy(-10);
+ break;
+ case 'Home':
+ Panel.scrollToTop();
+ break;
+ case 'End':
+ Panel.scrollToBottom();
+ break;
case 'Enter':
case ' ': // Space
Panel.pendingCallback_ = Panel.getCallbackForCurrentItem();
« no previous file with comments | « no previous file | chrome/browser/resources/chromeos/chromevox/cvox2/background/panel_menu.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698