Set focus on existing dialog rather than raise an error if the dialog when launching a dialog which is already open#12800
Conversation
|
I tested this PR and the current experience is good. Thanks. |
|
Hello Test successful
Test almost successfulTest 1STR:
Test 2STR:
Test with errorSTR:
Some dialogs are not re-focused when opened a second time:
NVDA+N not working while these dialogs are opened
Note:Most of the mentioned issues (if not all) were already present in NVDA. Thus this PR should not be reverted. But while fixing "Already opened dialog" problem, I think that they should be considered. |
|
Hi @CyrilleB79, thank you for testing this. All tests except the "Test almost successful" tests are existing behaviour (eg in 2021.1). These cases would throw the error message normally, and need to be improved as well as this will lead to confusion. Perhaps this PR should be reverted because of this. |
|
@CyrilleB79 |
|
@seanbudd is there a regression here? If so this may need to be reverted (before 2021.3) until these issues are resolved. |
@feerrenrut
There is no regression - but there is a change of behaviour. Instead of throwing an error message when a settings dialog is already opened, the dialog is focused, but not necessarily the target pane (eg Keyboard settings). Same for dictionary dialogs. The other bugs @CyrilleB79 raised can be reproduced with 2021.1 |
|
Thanks for the summary @seanbudd |
…naries are of different types. (#12967) Fix-up of #12800. Described in #12800 (comment), paragraph "Test almost successful", "Test 2". Summary of the issue: Since the merge of #12800, trying to re-open an already opened dialog allows to focus it rather than issuing an error as done previously. However, in the case of dictionaries, if you try to open the voice dictionary while the default is already open will lead to focus the default dictionary rather than opening the voice dictionary dialog; Description of how this pull request fixes the issue: Since the check of an existing opened dialog is made on the class of the dialog, I have sub-classed DictionaryDialog for the three types of dictionaries to make them distinct one from another. Co-authored-by: Sean Budd <sean@nvaccess.org>
Link to issue number: Follow-up of #12967 Summary of the issue: Since the merge of #12800, trying to re-open an already opened dialog allows to focus it rather than issuing an error message box. The dialog is refocused according to its class, i.e. trying to open a dialog of the same class rather refocus the first already opened dialog of the same class. But with #12800, it was not possible to open 2 dictionaries of different type (e.g. speech and default). This was fixed with #12967 by subclassing DictionaryDialog. However, addons which directly use DictionaryDialog will still have the issue of opening 2 dictionaries at once i.e. #5383. Description of how this pull request fixes the issue: force DictionaryDialog to be subclassed by making the initializer and abstract method
Link to issue number:
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:
NVDA+nto open the NVDA menupthensNVDA+nto open the NVDA menupthensDescription 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:
NVDA+nto open the NVDA menupthensNVDA+nto open the NVDA menupthensSystem testing
System testing could be added here, but for such a specific feature it seems unworthy, the reviewer may disagree.
Known issues with pull request:
Change log entries:
Changes
Code Review Checklist: