| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 goog.provide('cvox.ChromeVoxEditableTextBase'); | 5 goog.provide('cvox.ChromeVoxEditableTextBase'); |
| 6 goog.provide('cvox.TextChangeEvent'); | 6 goog.provide('cvox.TextChangeEvent'); |
| 7 goog.provide('cvox.TypingEcho'); | 7 goog.provide('cvox.TypingEcho'); |
| 8 | 8 |
| 9 goog.require('cvox.AbstractTts'); | 9 goog.require('cvox.AbstractTts'); |
| 10 goog.require('cvox.ChromeVox'); | 10 goog.require('cvox.ChromeVox'); |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 }; | 304 }; |
| 305 | 305 |
| 306 | 306 |
| 307 /** | 307 /** |
| 308 * Update the state of the text and selection and describe any changes as | 308 * Update the state of the text and selection and describe any changes as |
| 309 * appropriate. | 309 * appropriate. |
| 310 * | 310 * |
| 311 * @param {cvox.TextChangeEvent} evt The text change event. | 311 * @param {cvox.TextChangeEvent} evt The text change event. |
| 312 */ | 312 */ |
| 313 cvox.ChromeVoxEditableTextBase.prototype.changed = function(evt) { | 313 cvox.ChromeVoxEditableTextBase.prototype.changed = function(evt) { |
| 314 // Normalize space characters. |
| 315 evt.value = evt.value.replace('\u00a0', ' '); |
| 314 if (!this.shouldDescribeChange(evt)) { | 316 if (!this.shouldDescribeChange(evt)) { |
| 315 this.lastChangeDescribed = false; | 317 this.lastChangeDescribed = false; |
| 316 return; | 318 return; |
| 317 } | 319 } |
| 318 | 320 |
| 319 if (evt.value == this.value) { | 321 if (evt.value == this.value) { |
| 320 this.describeSelectionChanged(evt); | 322 this.describeSelectionChanged(evt); |
| 321 } else { | 323 } else { |
| 322 this.describeTextChanged(evt); | 324 this.describeTextChanged(evt); |
| 323 } | 325 } |
| (...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 716 | 718 |
| 717 /** | 719 /** |
| 718 * Moves the cursor backward by one paragraph. | 720 * Moves the cursor backward by one paragraph. |
| 719 * @return {boolean} True if the action was handled. | 721 * @return {boolean} True if the action was handled. |
| 720 */ | 722 */ |
| 721 cvox.ChromeVoxEditableTextBase.prototype.moveCursorToPreviousParagraph = | 723 cvox.ChromeVoxEditableTextBase.prototype.moveCursorToPreviousParagraph = |
| 722 function() { return false; }; | 724 function() { return false; }; |
| 723 | 725 |
| 724 | 726 |
| 725 /******************************************/ | 727 /******************************************/ |
| OLD | NEW |