Skip to content

Close WelcomeDialog instances before triggering NVDA Exit#12957

Merged
seanbudd merged 6 commits into
masterfrom
fix-12907
Oct 19, 2021
Merged

Close WelcomeDialog instances before triggering NVDA Exit#12957
seanbudd merged 6 commits into
masterfrom
fix-12907

Conversation

@seanbudd

@seanbudd seanbudd commented Oct 19, 2021

Copy link
Copy Markdown
Member

Link to issue number:

Fixes #12907

Summary of the issue:

NVDA crashes if the welcome dialog is open, and was opened via the NVDA menu.

Description of how this pull request fixes the issue:

Track instances of the welcome dialog as they are created, close them all before the exit dialog is triggers an exit.
As the cause of this problem is complicated, and a proper fix is risky, this small patch avoids touching the core module.

Testing strategy:

Manual testing:

  1. Start NVDA, close any open dialogs
  2. Open the Welcome Dialog via NVDA menu > Help
  3. Exit NVDA (exiting NVDA methods)

Confirm the other way to start a Welcome Dialog exits correctly.

  1. Start NVDA with the Welcome Dialog set to open on startup
  2. Exit NVDA (exiting NVDA methods) with the Welcome Dialog still open

System tests have been added which test the issue for quitting from keyboard via the Exit Dialog

Known issues with pull request:

The About Dialog still shares this problem, however it is harder to track instances of wx.MessageBox, it will need to be subclassed. Note the failure from the about dialog test in #12957 (comment)
This will be attempted in a separate PR.

Change log entries:

I think none needed - this is a rare bug fix that is a recent regression.

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

@seanbudd seanbudd requested a review from a team as a code owner October 19, 2021 02:06
@seanbudd seanbudd marked this pull request as draft October 19, 2021 02:07
@seanbudd

seanbudd commented Oct 19, 2021

Copy link
Copy Markdown
Member Author

There are issues with the system tests to be investigated, but the fix has been manually confirmed.

@AppVeyorBot

Copy link
Copy Markdown

See test results for failed build of commit 20c633bcc5

@AppVeyorBot

Copy link
Copy Markdown

See test results for failed build of commit f2ee2af9dc

@seanbudd seanbudd marked this pull request as ready for review October 19, 2021 03:40
@seanbudd

Copy link
Copy Markdown
Member Author

Note the failure from the about dialog test in #12957 (comment)

Comment thread source/gui/startupDialogs.py Outdated
instances = list(cls._instances)
for instance in instances:
if instance and not instance.IsBeingDeleted() and instance.IsModal():
instance.onOk(None) # Save and close

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.

I'm uncomfortable that this will save the state of the checkboxes. The user may have fiddled with the checkboxes on this dialog, but not have pressed okay yet. Then when they exit, it will automaticaly comit those changes, if I am assuming right? We really need the same action as pressing escape... cancel... Though I do acknowledge that there is no cancel button on the dialog. Would this be possible?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Closing this dialog without saving is also fine - it depends on what behaviour we prefer. Since there is no distinct "Save" vs "Cancel" button, it's hard to say what the default close action should be or what the user would expect.

@seanbudd seanbudd changed the title Save and close WelcomeDialog instances before triggering NVDA Exit Close WelcomeDialog instances before triggering NVDA Exit Oct 19, 2021
@seanbudd seanbudd merged commit 23249c0 into master Oct 19, 2021
@seanbudd seanbudd deleted the fix-12907 branch October 19, 2021 04:42
@nvaccessAuto nvaccessAuto added this to the 2021.3 milestone Oct 19, 2021
@feerrenrut feerrenrut mentioned this pull request Oct 19, 2021
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 crashes if exiting while welcome dialog open

4 participants