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

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

Issue 2010493004: Ignore duplicate HOVER events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Check for valid currentRange 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 | « no previous file | 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 ba484eac0227a89c992c25a26567c1df8a9a7970..260a7440b1f212465db49b0d06f49ad6fcb46323 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
@@ -47,7 +47,7 @@ DesktopAutomationHandler = function(node) {
this.addListener_(e.ariaAttributeChanged, this.onEventIfInRange);
this.addListener_(e.checkedStateChanged, this.onEventIfInRange);
this.addListener_(e.focus, this.onFocus);
- this.addListener_(e.hover, this.onEventWithFlushedOutput);
+ this.addListener_(e.hover, this.onHover);
this.addListener_(e.loadComplete, this.onLoadComplete);
this.addListener_(e.menuEnd, this.onMenuEnd);
this.addListener_(e.menuListItemSelected, this.onEventIfSelected);
@@ -160,6 +160,17 @@ DesktopAutomationHandler.prototype = {
},
/**
+ * @param {!AutomationEvent} evt
+ */
+ onHover: function(evt) {
+ if (ChromeVoxState.instance.currentRange &&
+ evt.target == ChromeVoxState.instance.currentRange.start.node)
+ return;
+ Output.flushNextSpeechUtterance();
+ this.onEventDefault(evt);
+ },
+
+ /**
* Makes an announcement without changing focus.
* @param {!AutomationEvent} evt
*/
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698