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

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

Issue 2296013002: setCurrentRange should ensure it moves ChromeVox to a valid range. (Closed)
Patch Set: Make sure newRange is defined. Created 4 years, 4 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/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 f5546f542e6244bd5fde34d44e02f3855c0d4d88..c464f1cfb76d8316bb2ba55d335da481d447daad 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
@@ -335,6 +335,9 @@ Background.prototype = {
if (!this.inExcursion_ && newRange)
this.savedRange_ = new cursors.Range(newRange.start, newRange.end);
+ if (newRange && !newRange.isValid())
+ return;
+
this.currentRange_ = newRange;
var oldMode = this.mode_;
var newMode = this.getMode();
« 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