Version: 55.0.2852.0 canary (64-bit)
OS: Windows 10 64-bit
On a contentEditable, if IAccessibleText::setCaretOffset is called with an offset greater than 0, it sets the caret offset to the end of the text (the value of IAccessibleText::nCharacters).
STR (with NVDA and a braille display):
1. Start NVDA with a braille display connected and configured.
2. Open this URL in Chrome: data:text/html,<div role="textbox" contentEditable="true">abcd</div>
3. Focus the contentEditable.
4. Ensure NVDA is in focus mode.
5. Press the cursor routing button above the letter "b" in "abcd".
Expected: The cursor should move to "b".
Actual: It moves to the end of the text (after "d").
STR (with NVDA Python console):
1. Start NVDA.
2. Open this URL in Chrome: data:text/html,<div role="textbox" contentEditable="true">abcd</div>
3. Focus the contentEditable.
4. Press NVDA+control+z to open the NVDA Python console.
5. Enter this command: focus.IAccessibleTextObject.setCaretOffset(0)
6. Enter this command: focus.IAccessibleTextObject.caretOffset
Result (correct): 0
7. Enter this command: focus.IAccessibleTextObject.setCaretOffset(1)
8. Enter this command: focus.IAccessibleTextObject.caretOffset
Expected: 1
Actual: 4
Impact: This breaks cursor routing with a braille display in many editors, including Google Docs.
Comment 1 by bugdroid1@chromium.org
, Oct 21 2016