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

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

Issue 1977853003: Only read out selected node in processing menuListItemSelected event. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/background_test.extjs ('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/desktop_automation_handler.js
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/desktop_automation_handler.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/desktop_automation_handler.js
index f7c5a73a3482f922976e638fdc1cdbcf028c4bae..833ee6411e05d8053af22197b1ad9863583b8cd0 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/desktop_automation_handler.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/desktop_automation_handler.js
@@ -50,7 +50,7 @@ DesktopAutomationHandler = function(node) {
this.addListener_(e.hover, this.onEventWithFlushedOutput);
this.addListener_(e.loadComplete, this.onLoadComplete);
this.addListener_(e.menuEnd, this.onMenuEnd);
- this.addListener_(e.menuListItemSelected, this.onEventDefault);
+ this.addListener_(e.menuListItemSelected, this.onEventIfSelected);
this.addListener_(e.menuStart, this.onMenuStart);
this.addListener_(e.scrollPositionChanged, this.onScrollPositionChanged);
this.addListener_(e.selection, this.onEventWithFlushedOutput);
@@ -146,6 +146,14 @@ DesktopAutomationHandler.prototype = {
/**
* @param {!AutomationEvent} evt
*/
+ onEventIfSelected: function(evt) {
+ if (evt.target.state.selected)
+ this.onEventDefault(evt);
+ },
+
+ /**
+ * @param {!AutomationEvent} evt
+ */
onEventWithFlushedOutput: function(evt) {
Output.flushNextSpeechUtterance();
this.onEventDefault(evt);
« no previous file with comments | « chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698