Skip to content

Improve control validation in the settings dialog #15894

@hwf1324

Description

@hwf1324

This issue was reported by @wmhn1872265132

Steps to reproduce:

Reproduction method 1:

  1. Open NVDA Keyboard settings.
    Deselect all items in the "Select NVDA Modifier Keys" list.
  2. Navigate to other categories (such as Mouse settings) through "Categories:".
  3. Click the OK button
  4. Click the OK button in the warning dialog box.

Reproduction method 2:

  1. Open Speech settings
    Deselect "talk" in the list of modes available in the Cycle speech mode command.
  2. Like method 1
  3. Click the OK button
  4. Click the "No" button in the warning dialog box.

Actual behavior:

The focus jumps back to the corresponding list that needs adjustment (for method 1, it is the "Select NVDA Modifier Keys" list, for method 2, it is the "Modes available in the Cycle speech mode command:" list), but the title of the settings window and the category list remain as the options before clicking "OK" (in this case, it is the mouse settings). Additionally, the GUI does not switch to the corresponding settings panel.

Expected behavior:

The focus jumps back to the corresponding list that needs adjustment (for method 1, it is the "Select NVDA Modifier Keys" list, for method 2, it is the "Modes available in the Cycle speech mode command:" list). The title and category lists of the settings window should also be updated simultaneously (method 1 should be keyboard settings, method 2 should be speech settings). At the same time, the GUI switches to the corresponding settings panel.

NVDA logs, crash dumps and other attachments:

System configuration

NVDA installed/portable/running from source:

portable

NVDA version:

alpha-30253

Windows version:

Name and version of other software in use when reproducing the issue:

Other information about your system:

Other questions

Does the issue still occur after restarting your computer?

Have you tried any other versions of NVDA? If so, please report their behaviors.

If NVDA add-ons are disabled, is your problem still occurring?

Does the issue still occur after you run the COM Registration Fixing Tool in NVDA's tools menu?

The reason for this issue is: calling the SetFocus function of a control in one category tab from another category tab, but without changing the GUI

For the solution, I have several ideas:

  1. Change the category before using SetFocus.
    1. Directly use the index of SettingsPanel.
    2. Add a getter to SettingsPanel.
    3. Add an index property to each SettingsPanel when creating catListCtrl.
  2. Add a method to display the SettingsPanel.
    1. Add a method to each SettingsPanel to set the visibility of this panel.
    2. Allow the SetFocus of each control under each SettingsPanel to directly switch to the category of the SettingsPanel where the control is located.

I think the last option is the most scalable, but I don't know how to implement it
For example, how to hook the SetFocus of all controls in a SettingsPanel only
CC: @CyrilleB79, @lukaszgo1, @LeonarddeR, any suggestions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    component/NVDA-GUIp4https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#prioritytriagedHas been triaged, issue is waiting for implementation.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions