Commit 9608522d authored by David Tseng's avatar David Tseng Committed by Commit Bot

Proactively clear ChromeVox focus ring

Change-Id: I5712c277c3a52b824e35ebc990e78e2131b18a73
Reviewed-on: https://chromium-review.googlesource.com/1217031Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
Commit-Queue: David Tseng <dtseng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#590412}
parent 75f908e6
......@@ -178,15 +178,21 @@ Background.prototype = {
// the user navigates.
cvox.ChromeVox.braille.thaw();
if (newRange && !newRange.isValid())
if (newRange && !newRange.isValid()) {
chrome.accessibilityPrivate.setFocusRing([]);
return;
}
this.currentRange_ = newRange;
ChromeVoxState.observers.forEach(function(observer) {
observer.onCurrentRangeChanged(newRange);
});
if (this.currentRange_) {
if (!this.currentRange_) {
chrome.accessibilityPrivate.setFocusRing([]);
return;
}
var start = this.currentRange_.start.node;
start.makeVisible();
......@@ -201,7 +207,6 @@ Background.prototype = {
var url = root.docUrl;
url = url.substring(0, url.indexOf('#')) || url;
cvox.ChromeVox.position[url] = position;
}
},
/**
......
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