Set focus on existing dialog rather than raise an error if the dialog when launching a dialog which is already open (#12800)
Fixes #5383
Summary of the issue:
NVDA raises an error when launching a dialog, when the dialog is already open. This is unfriendly to the user, and should instead focus the open dialog.
Example:
Press NVDA+n to open the NVDA menu
Launch the settings dialog by pressing p then s
Change a setting, so that you can confirm a new instance isn't created
Minimise the settings dialog window
Press NVDA+n to open the NVDA menu
Launch the settings dialog by pressing p then s
An error message is raised
Description of how this pull request fixes the issue:
Set focus on existing dialog rather than raise an error if the dialog when launching a dialog which is already open.
Testing strategy:
Manual testing:
Press NVDA+n to open the NVDA menu
Launch the settings dialog by pressing p then s
Change a setting, so that you can confirm a new instance isn't created
Minimise the settings dialog window
Press NVDA+n to open the NVDA menu
Launch the settings dialog by pressing p then s
Confirm the same settings dialog from before is now focused, a new instance was not created, and the error message dialog isn't opened.