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

Speech is not canceled after focus event fired. #11889

Open
pawelurbanski opened this issue Dec 1, 2020 · 3 comments
Open

Speech is not canceled after focus event fired. #11889

pawelurbanski opened this issue Dec 1, 2020 · 3 comments

Comments

@pawelurbanski
Copy link

Steps to reproduce:

Using Visual Studio Code where this behavior was discovered:

  1. Override the event_gainFocus event with custom code,
  2. Create a textInfo object with position selection,
  3. Collapse and expand it to unit line,
  4. Create a test condition that checks if line start offsets are teh same after code completion is inserted,
  5. If they are the same call: speech.cancelSpeech()

Actual behavior:

Speech gets canceled, but after some delay. First character or 2 are read from teh line where start offsets have evaluated to be the same. Then reading the rest of the line is skipped.
When calling: speech.speakText() or speech.speakTextInfo() with properly expanded character offset to make sure that we fall on an empty charactr does not help. The begginging of the line as described gets announced.

Expected behavior:

Speech should be canceled and optionally the desired character should be announced or nothing when for example using the call to: speech.speakTextInfo() with suppressBlanks=True.

System configuration

A laptop/desktop with 4 core CPU and 16GB of RAM.

NVDA installed/portable/running from source:

NVDA is isntalled.

NVDA version:

Version 2020.3.

Windows version:

Windows 64-bit 10.0.19042

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

Visual Studio Code (Stable = 1.51.1 / Insider 1.52 build as of 2020-12-01)

Other information about your system:

Logging speech category provides the following information:

  1. There are no errors when getting the selection offsets,
  2. NVDA detects caret changes using bookmarks,
  3. Speech manager seems to clear teh speech sequence queue before the focus event gets fired on the textarea control,
  4. The following log fragment might be helpful:
    IO - speech.speak (15:25:39.132) - MainThread (8236):
    Speaking ['\x00', (It is an empty character for a role I want to be silent.)
    CancellableSpeech (still valid devInfo(
    isCanceledCache: False, (What does it mean?)
     isValidCallback: True, (What does it mean?)
    isValidCallbackDevInfo:  ), (Seems to have no value.)
     '    IDBFactory.apply.arguments\n'] (The line from the editor.)

Other questions

Does the issue still occur after restarting your computer?

Yes and after restarting NVDA or reloading the add-ons.

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

Yes - version 2020.2 and the issue is the same.

If addons are disabled, is your problem still occuring?

The problem is related to the code in an add-on, which is ment to eliminate reading the contents of the line when the caret or selection is in teh same line. It is the situation when the user gets code completion suggestions that get inserted by the IDE.

Did you try to run the COM registry fixing tool in NVDA menu / tools?

Yes and the behavior is the same.

@Adriani90
Copy link
Collaborator

Cc: @feerrenrut

@pawelurbanski
Copy link
Author

pawelurbanski commented Dec 6, 2020 via email

@Adriani90
Copy link
Collaborator

@pawelurbanski are you still looking for advice in this case?
cc: @seanbudd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants