Skip to content

JAB: do not treat ActiveDescendentChange event from not focused component as focus gained event (#5989)#11048

Merged
feerrenrut merged 3 commits into
nvaccess:masterfrom
kaleev:i5989
Jun 12, 2020
Merged

JAB: do not treat ActiveDescendentChange event from not focused component as focus gained event (#5989)#11048
feerrenrut merged 3 commits into
nvaccess:masterfrom
kaleev:i5989

Conversation

@kaleev

@kaleev kaleev commented Apr 23, 2020

Copy link
Copy Markdown
Contributor

Link to issue number:

closes #5989

Summary of the issue:

When a PropertyActiveDescendentChange event is received, nvda transform it into a event_gainFocus event.

The issue is that PropertyActiveDescendentChange can be raised by components (e.g. tree view) that don't have the focus. In that case, a PropertyActiveDescendentChange does not imply that the newly selected tree node has received the focus.

Description of how this pull request fixes the issue:

Treat PropertyActiveDescendentChange event as focus gained event only if event source has focus or it is an ancestor is the focused component.

Testing performed:

  • Start Java application mention in the issue comment.
  • Move caret in the opened text editor.
  • Ensure that changing tree selection on caret move not treaded as focus gained and
    it is not voiced by nvda.

Known issues with pull request:

None

Change log entry:

Bug fixes
Do not change focus in Java application when selection is change in not focused tree, table or list. (#5989)

Comment thread source/JABHandler.py Outdated
@lukaszgo1

Copy link
Copy Markdown
Contributor

@LeonarddeR Could you please review the latest changes here? Without this fix using Gutter in JetBrains IDE's is quite annoying as editor scrolls in the background and NVDA threads this as a focus change.

@LeonarddeR LeonarddeR left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is ok, though I'm unable to test this myself.

@dpy013

dpy013 commented Jun 11, 2020

Copy link
Copy Markdown
Contributor

Will the current PR merge 2020.2?

@feerrenrut feerrenrut left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @kaleev!

@feerrenrut feerrenrut merged commit 6bf3ae5 into nvaccess:master Jun 12, 2020
@nvaccessAuto nvaccessAuto added this to the 2020.2 milestone Jun 12, 2020
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

Successfully merging this pull request may close these issues.

JAB: nvda should not treat ActiveDescendentChange as a focus gained event

6 participants