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

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

Issue 2263513004: Add support for rich output inside of content editables. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@editable_nav
Patch Set: Test fixes. 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
Index: chrome/browser/resources/chromeos/chromevox/cvox2/background/cursors.js
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/cursors.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/cursors.js
index 974e0a4f0d7313363085ca4bd8f2a114a191d849..65011670b96af423c7a0aa6d3ec300dad4d7d324 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/cursors.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/cursors.js
@@ -140,7 +140,8 @@ cursors.Cursor.prototype = {
if (!this.node)
return null;
- if (this.node.role == RoleType.inlineTextBox)
+ if (this.node.role == RoleType.inlineTextBox ||
+ this.index_ == cursors.NODE_INDEX)
return this.node.parent;
return this.node;
@@ -165,9 +166,7 @@ cursors.Cursor.prototype = {
sibling = sibling.previousSibling;
}
} else if (this.index_ == cursors.NODE_INDEX) {
- // Indicies of this kind are buggy. Set it to 0 (different than the DOM
- // index in parent convention).
- adjustedIndex = 0;
+ adjustedIndex = this.node.indexInParent + 1;
}
return adjustedIndex;
},

Powered by Google App Engine
This is Rietveld 408576698