Open Danstiv opened 2 weeks ago
cc @LeonarddeR
Technical: It looks like IA2TextTextInfo always supported _getSentenceOffsets, as IAccessible2 does have a sentence unit. However, OffsetsTextInfo _getUnitOffsets did not support sentence, therefore it was never used. Now that OffsetsTextInfo knows about sentence, at least allowing subclasses to implement _getSentenceOffsets, this means that IAccessible2's sentence support is suddenly exercised and therefore moving by sentence in the base EditableText class does not raise an error, thus alt+upArrow and alt+downArrow actually work for IAccessible2 and therefore in VS Code. The easiest way to revert this behaviour is to remove IA2TextTextInfo's _getSentenceOffsets method. But I think this requires a little more consideration. I think the binding of alt+upArrow / alt+downArrow across the board is debatable...
I think there are several approaches that can be combined:
_caretMoveBySentenceHelper
execute the gesture first and only try to sentence nav when executing the gesture didn't yield a caret eventThis ensures that in Chrome, sentence nav will work in certain edit controls with the cost of a little delay, whereas in VS Code on the web, sentence nav will not apply.
cc @mltony
CC Tony for reference, this may also need attention when implementing the sentence navigation feature later.
Steps to reproduce:
Actual behavior:
Lines is not moving.
Expected behavior:
Keyboard shortcuts work as usual, the line under the cursor moves up/down.
NVDA logs, crash dumps and other attachments:
System configuration
NVDA installed/portable/running from source:
Installed
NVDA version:
alpha-33623,37b40464 (2025.1.0.33623)
Windows version:
Windows 11 23H2 (AMD64) build 22631.4037
Name and version of other software in use when reproducing the issue:
Visual Studio Code
Other information about your system:
Other questions
Does the issue still occur after restarting your computer?
Yes.
Have you tried any other versions of NVDA? If so, please report their behaviors.
NVDA from source before that commit works normally.
68f5fcc15 Fix PowerPoint caret reporting when text contains wide characters, and overall improvement of TextInfo implementation (#17015)
If NVDA add-ons are disabled, is your problem still occurring?
Yes.
Does the issue still occur after you run the COM Registration Fixing Tool in NVDA's tools menu?
Yes.