Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Up/down arrow should read character by character in single line edit fields #12780

Open
CyrilleB79 opened this issue Aug 25, 2021 · 3 comments
Open
Labels
feature/windows-explorer Windows start menu, explorer, and other in-box functionality.

Comments

@CyrilleB79
Copy link
Collaborator

CyrilleB79 commented Aug 25, 2021

Originally reported by @CyrilleB79 in #12632 (comment)

Steps to reproduce:

  1. Focus a single line edit field, e.g.:
    • Open Windows Explorer and select a file
    • Press F2 to edit the file name
  2. Press many times up and down arrows to navigate by character
  3. Press many times ctrl+upaArrow and ctrl+downArrow to navigate by word
  4. Press ctrl+home and ctrl+end to move to first and last char of the line

Note that in single line edit fields, moving to another line has no sense. Thus, MS has mapped vertical arrow movements to their corresponding movements with horizontal arrows, i.e. up/downArrow gestures move character by character as left/rightArrow gestures; and ctrl+up/downArrow gestures move word by word.

Actual behavior:

At each step, the whole line is read

Expected behavior:

  1. Report current character rather than current line as Narrator does.
  2. Report current word rather than current line.
  3. Maybe report current character instead of current line to denote that there is no line change in this type of edit field? To be discussed.

System configuration

NVDA installed/portable/running from source:

Installed

NVDA version:

2021.2beta2 but probably any other one as well.

Windows version:

Windows 10 20H2 (64-bit) build 19042.1110

Name and version of other software in use when reproducing the issue:

N/A

Other information about your system:

N/A

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.

No but probably the same behaviour in other versions.

If 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?

Not tested

Note: When resolving this issue, please test the STR in #12632. This issue is probably blocked by #12632.

@feerrenrut feerrenrut added the feature/windows-explorer Windows start menu, explorer, and other in-box functionality. label Aug 25, 2021
@CyrilleB79
Copy link
Collaborator Author

@feerrenrut I can see that you have added the feature/windows-explorer label to this issue.
Note however that Windows Explorer is used as an example. But you may encounter this issue in any standard single line edit field.
For another unrelated example, just try in the filter field of the input gesture dialog of NVDA.

@LeonarddeR
Copy link
Collaborator

The fields you describe are edit controls (i.e. they have a window class of "Edit"). This looks like behavior that's only standard to these controls. I tried the subject fields of Mozilla Thunderbird and Outlook, and there this logic doesn't apply.

@CyrilleB79
Copy link
Collaborator Author

I have tested on my side on the subject field of Outlook which is Rich Edit. I can confirm @LeonarddeR's test, i.e. that vertical arrows do not act as horizontal ones in this field.
I have also tested in edit fields that are parts of a combo-box such as file name in a "Save as" dialog. They are also single line edit fields with a window class of Edit. However, since they are part of a combo-box, vertical arrows do not act as horizontal ones, since they are mapped for the combo-box usage, i.e. selection in the associated list.

seanbudd pushed a commit that referenced this issue Oct 4, 2021
… or end is reached, do not move the caret anymore (#12897)

Fixes #12632

Summary of the issue:
In Python console, up/down arrow behaves as follow:

If command history start or end is not reached, move to previous or next item in the command history.
If command history start or end is reached, move the caret one character left or right; this is the default behaviour of some single line edit fields (cf. Up/down arrow should read character by character in single line edit fields #12780)
The point 2. is an unintuitive corner case. Indeed, up/down arrow cannot be used generally in this field to navigate character by character, this is only partially possible in some rare cases, i.e. at the edge of command history buffer.

Description of how this pull request fixes the issue:
Navigation character by character with up/down arrows should be totally disabled in the console input field.
The caret should not move at all if the line has not been updated.

Testing strategy:
Checked that up/down arrows still work in the console to re-read the command history
When reaching the first command in history, pressed up arrow again and checked that the caret does not move left anymore (STR of Python console - The caret moves to left when pressing upArrow #12632).

STR:
Type various commands in the console
Type a last command without pressing Enter
Turn back some characters left with left arrow
Press down arrow once and checked that the caret has not moved.

Known issues with pull request:
In the case the Narrator is used along with NVDA (which is a very unlikely use case):
When pressing up arrow, the last character of the first command in history will be read instead of the whole line.

An alternative solution that would be compatible with Narrator could be to use a multi-line edit field even if it is only filled with one line of text. But the implementation would be more complex; I do not think it is worth implementing it to support this very unlikely use case.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/windows-explorer Windows start menu, explorer, and other in-box functionality.
Projects
None yet
Development

No branches or pull requests

3 participants