Skip to content

Fix context menu bouncing in Edge browse mode#15316

Merged
seanbudd merged 3 commits into
nvaccess:masterfrom
LeonarddeR:edgeFix2
Aug 21, 2023
Merged

Fix context menu bouncing in Edge browse mode#15316
seanbudd merged 3 commits into
nvaccess:masterfrom
LeonarddeR:edgeFix2

Conversation

@LeonarddeR

Copy link
Copy Markdown
Collaborator

Link to issue number:

Fixes #15309

Summary of the issue:

In Edge browse mode, when opening the context menu, NVDA many times goes back to browse mode.

Description of user facing changes

NVDA will no correctly focus the context menu opened from Edge browse mode.

Description of development approach

The issue behind this is as follows. Take a link as example:

  1. Disabling the option Automatically set system focus to focusable elements ensures that an object only gets focus when strictly necessary. This is the case when opening the context menu, because otherwise, the context menu would open for the wrong object.
  2. When opening the context menu on the link, NVDA calls script_passThrough
  3. script_passThrough calls setFocus on the link's object and sends the gesture.
  4. Two focus events are fired, one for the link in the document and one for the context menu
  5. NVDA first processes the context menu event and after that, the link object event
  6. Focus bounces from the context menu back to the link.

There is a very trivial fix for this. With calling api.processPendingEvents, we ensure that NVDA first processes the event generated by setFocus before executing the gesture.

Testing strategy:

Tested the str from #15309

Known issues with pull request:

None known

Change log entries:

Bug fixes

Code Review Checklist:

  • Pull Request description:
    • description is up to date
    • change log entries
  • Testing:
    • Unit tests
    • System (end to end) tests
    • Manual testing
  • API is compatible with existing add-ons.
  • Documentation:
    • User Documentation
    • Developer / Technical Documentation
    • Context sensitive help for GUI changes
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers
    • Localization in other languages / culture than English
  • Security precautions taken.

@LeonarddeR LeonarddeR requested a review from a team as a code owner August 19, 2023 17:49
@LeonarddeR LeonarddeR requested a review from seanbudd August 19, 2023 17:49

@seanbudd seanbudd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @LeonarddeR

@seanbudd seanbudd merged commit 10822f3 into nvaccess:master Aug 21, 2023
@nvaccessAuto nvaccessAuto added this to the 2023.3 milestone Aug 21, 2023
@Shah2

Shah2 commented Sep 15, 2023

Copy link
Copy Markdown

Using Microsoft Edge 116 with NVDA 2023.3 Beta 1, the context menu in the Edge history is still not accessible.

@LeonarddeR

Copy link
Copy Markdown
Collaborator Author

@Shah2 Please create a new issue for this. This pull request is closed.

@brunoprietog

Copy link
Copy Markdown

Now that I've updated to the latest alpha version, without the option to focus on elements when exploring in browse mode, I frequently see this error. I always have to focus on the link first before pressing shift + f10 so that it doesn't return to exploration mode.

@seanbudd

Copy link
Copy Markdown
Member

@brunoprietog - please open a new issue for this. This pull request is closed.

@brunoprietog

Copy link
Copy Markdown

@seanbudd, I've opened #18670

@LeonarddeR LeonarddeR deleted the edgeFix2 branch August 23, 2025 06:27
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.

NVDA can't access context menus opened on some links/images in Edge, even when Narrator can

5 participants