Skip to content

Close RPC console autocomplete when changing desktop tabs #782

Description

@johnny9

Problem

In the desktop wallet view, enter a partial RPC command such as getblock to open the console autocomplete popup, then select another top-level tab. The popup remains visible above the newly selected view.

DesktopWallets keeps CommandConsole alive as a StackLayout child. The autocomplete is a Popup, whose current dismissal paths are Escape, focus loss, and input changes; switching the top-level tab does not notify the console that it was left.

Steps to reproduce

  1. Start the desktop wallet view and select the Console tab.
  2. Type a command prefix with available matches, for example getblock.
  3. Confirm the autocomplete popup is open.
  4. Select Activity, Settings, or another top-level tab.

Actual: The autocomplete popup remains visible over the selected tab.

Expected: The popup closes when leaving the Console tab.

Proposed fix

Expose tab changes through the common navigation bar API. The signal should carry the previous and newly selected tab controls, e.g. tabChanged(previousTab, currentTab), so a child view can react to leaving its own tab without depending on a numeric index.

CommandConsole can receive its associated navigation tab and call autocompletePopup.close() when previousTab is that tab. This keeps transient-UI cleanup local to the owning view while providing a reusable tab-transition hook for other persistent desktop views.

Test coverage

Add a QML regression test that opens consoleAutocompletePopup, switches from Console to another desktop tab, and verifies the popup is no longer visible.

A proposed implementation is available on johnny9:fix/console-autocomplete-tab-switch.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions