Commit 9e321da8 authored by David Tseng's avatar David Tseng Committed by Commit Bot

Read spin button value changes.

Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: Ia1da47333ae15edb2cbeda1b0b7d0db9f30606a9
Reviewed-on: https://chromium-review.googlesource.com/1055654Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
Commit-Queue: David Tseng <dtseng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#558038}
parent f82aa825
...@@ -97,7 +97,7 @@ DesktopAutomationHandler = function(node) { ...@@ -97,7 +97,7 @@ DesktopAutomationHandler = function(node) {
* Time to wait until processing more value changed events. * Time to wait until processing more value changed events.
* @const {number} * @const {number}
*/ */
DesktopAutomationHandler.VMIN_VALUE_CHANGE_DELAY_MS = 500; DesktopAutomationHandler.VMIN_VALUE_CHANGE_DELAY_MS = 50;
/** /**
* Controls announcement of non-user-initiated events. * Controls announcement of non-user-initiated events.
...@@ -460,8 +460,10 @@ DesktopAutomationHandler.prototype = { ...@@ -460,8 +460,10 @@ DesktopAutomationHandler.prototype = {
evt.target.state[StateType.EDITABLE]) evt.target.state[StateType.EDITABLE])
return; return;
// Delegate to the edit text handler if this is an editable. // Delegate to the edit text handler if this is an editable, with the
if (evt.target.state[StateType.EDITABLE]) { // exception of spin buttons.
if (evt.target.state[StateType.EDITABLE] &&
evt.target.role != RoleType.SPIN_BUTTON) {
this.onEditableChanged_(evt); this.onEditableChanged_(evt);
return; return;
} }
...@@ -478,10 +480,10 @@ DesktopAutomationHandler.prototype = { ...@@ -478,10 +480,10 @@ DesktopAutomationHandler.prototype = {
this.lastValueChanged_ = new Date(); this.lastValueChanged_ = new Date();
var output = new Output(); var output = new Output();
output.withQueueMode(cvox.QueueMode.CATEGORY_FLUSH);
if (fromDesktop && if (fromDesktop &&
(!this.lastValueTarget_ || this.lastValueTarget_ !== t)) { (!this.lastValueTarget_ || this.lastValueTarget_ !== t)) {
output.withQueueMode(cvox.QueueMode.CATEGORY_FLUSH);
var range = cursors.Range.fromNode(t); var range = cursors.Range.fromNode(t);
output.withRichSpeechAndBraille( output.withRichSpeechAndBraille(
range, range, Output.EventType.NAVIGATE); range, range, Output.EventType.NAVIGATE);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment