| Index: chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
|
| diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
|
| index ca1563fd1232b800ab6d77d860c4491d2b6e34b9..927cdc6ef06eb132d4229d1cc011b0ab81f70d42 100644
|
| --- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
|
| +++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
|
| @@ -62,13 +62,13 @@ Background = function() {
|
| alert: this.onEventDefault,
|
| focus: this.onEventDefault,
|
| hover: this.onEventDefault,
|
| + loadComplete: this.onLoadComplete,
|
| menuStart: this.onEventDefault,
|
| menuEnd: this.onEventDefault,
|
| menuListValueChanged: this.onEventDefault,
|
| - loadComplete: this.onLoadComplete,
|
| textChanged: this.onTextOrTextSelectionChanged,
|
| textSelectionChanged: this.onTextOrTextSelectionChanged,
|
| - valueChanged: this.onEventDefault
|
| + valueChanged: this.onValueChanged
|
| };
|
|
|
| // Register listeners for ...
|
| @@ -320,6 +320,28 @@ Background.prototype = {
|
| },
|
|
|
| /**
|
| + * Provides all feedback once a value changed event fires.
|
| + * @param {Object} evt
|
| + */
|
| + onValueChanged: function(evt) {
|
| + // Don't process nodes inside of web content if ChromeVox Next is inactive.
|
| + if (evt.target.root.role != chrome.automation.RoleType.desktop &&
|
| + !this.active_)
|
| + return;
|
| +
|
| + if (!evt.target.state.focused)
|
| + return;
|
| +
|
| + // Value change events fire on web text fields and text areas when pressing
|
| + // enter; suppress them.
|
| + if (!this.currentRange_ ||
|
| + evt.target.role != chrome.automation.RoleType.textField) {
|
| + this.onEventDefault(evt);
|
| + this.currentRange_ = cursors.Range.fromNode(evt.target);
|
| + }
|
| + },
|
| +
|
| + /**
|
| * Called when the automation tree is changed.
|
| * @param {chrome.automation.TreeChange} treeChange
|
| */
|
|
|