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

problems when last line in notepad contains only one character #17402

Open
burmancomp opened this issue Nov 15, 2024 · 12 comments
Open

problems when last line in notepad contains only one character #17402

burmancomp opened this issue Nov 15, 2024 · 12 comments
Labels
blocked/needs-external-fix p2 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority platform/Windows11 Issues specific to Windows 11 triaged Has been triaged, issue is waiting for implementation.

Comments

@burmancomp
Copy link
Contributor

Steps to reproduce:

  • open notepad in windows 11
  • write just one character/make sure last text line contains only one character and no blank line after it
  • move caret to that line, and press end to move caret to end of line

Actual behavior:

Gestures like nvda+l and nvda+shift+. (laptop layout) announce "blank", and it is not possible to move review cursor to that character which is in last line.

Expected behavior:

Last line is spoken, and it can be reviewed.

NVDA logs, crash dumps and other attachments:

System configuration

NVDA installed/portable/running from source:

installed

NVDA version:

alpha-34581,32245d46 (2025.1.0.34581)

Windows version:

windows 11 23h2

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

notepad

Other information about your system:

Other questions

Does the issue still occur after restarting your computer?

Have you tried any other versions of NVDA? If so, please report their behaviors.

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?

@Adriani90
Copy link
Collaborator

I can reproduce that as well.

@nvdaes
Copy link
Collaborator

nvdaes commented Nov 16, 2024

I can also reproduce this.
I've performed tests with textInfos, and I think that the carriage return is appended outside the _rangeObj.
We can create workarounds in NVDA, or someone may know how to fix it appropriately. Though imo perhaps Microsoft should fix this.
@josephsl may know much more about this.

@nvdaes
Copy link
Collaborator

nvdaes commented Nov 16, 2024

Some texts can be the following:

From notepad, with a document which contains a character, for example, "a":

  1. Press the arrow key to the end of the line
  2. Open the Python console
  3. Type: i=focus.makeTextInfo("all"), and then i.text
  4. Close the Python console, and from the document press the End key.
  5. Repeat steps 2 and 3.

When we press end, we land into a different textInfo.
We may create a script so that end key doesn't move there, but just to the last character. I have tried to change the behavior of the UIA textInfo class without success.
I guess that issue #17251 is related to this problem.
I created PR #17401
If something is proposed for the current issue, I can close this PR.

@Adriani90
Copy link
Collaborator

But if thhe carriage return was outside object range, this issue would occur also on other lines or between every line. Or am I wrong?

@burmancomp
Copy link
Contributor Author

I noticed one interesting behavior:

When there is document where there is empty line as last line, and caret is there and you press end key you are in the end of previous line. Can you reproduce this?

@titet11
Copy link

titet11 commented Nov 16, 2024

@burmancomp

Yes, but that only happens in Windows 11. It hasn't happened to me in Windows 10.

@nvdaes
Copy link
Collaborator

nvdaes commented Nov 16, 2024

Adriani wrote:

But if thhe carriage return was outside object range, this issue would occur also on other lines or between every line. Or am I wrong?

I guess that this happens just in the last return carriage of the document. Not sure.

@nvdaes
Copy link
Collaborator

nvdaes commented Nov 16, 2024

When there is document where there is empty line as last line, and caret is there and you press end key you are in the end of previous line. Can you reproduce this?

I can reproduce it.

@josephsl
Copy link
Collaborator

Hi,

I can reproduce this. In order to better investigate this, we need the exact version of Notepad in use (I have 11.2410.17.0); remember that Notepad in Windows 11 is updated via Microsoft Store, so getting the version info is crucial).

Thanks.

@nvdaes
Copy link
Collaborator

nvdaes commented Nov 16, 2024

My Notepad version is the following, reported by SayProductNameAndVersion add-on, published by @XLTechie

Microsoft.WindowsNotepad 11.2409.9.0

Windows version: Windows 11 23H2 (10.0.22631) workstation AMD64

NVDA 2024.4.1

@burmancomp
Copy link
Contributor Author

I have notepad version 11.2409.9.0.

I think that review cursor behavior is somewhat strange in notepad settings window. If you navigate with review cursor to object where version number and copyright information is shown you may notice that you are directly at "copyright line" of object although line above it shows version number. If you then move line up with review cursor, and then line down again you may notice that whole copyright line is selected which in this context means that if you press nvda+f9 and then twice nvda+f10 you can hear that whole line is copied to clipboard.

It seems also that there is extra caret event when that object is navigated to with "move navigator object to next object" gesture. As far as I understand there should not be caret event then.

Can you reproduce any of these?

@burmancomp
Copy link
Contributor Author

After shutting laptop and starting it again I cannot reproduce issues as to strange behavior when moving with review cursor which I told about in my previous comment.

@seanbudd seanbudd added blocked/needs-external-fix p2 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority platform/Windows11 Issues specific to Windows 11 triaged Has been triaged, issue is waiting for implementation. labels Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked/needs-external-fix p2 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority platform/Windows11 Issues specific to Windows 11 triaged Has been triaged, issue is waiting for implementation.
Projects
None yet
Development

No branches or pull requests

6 participants