Skip to content

maple-agent: Clicking on a popup menu that is already open should dismiss it #997

Closed

Description

@marksftw

When clicking on a button that displays a popup menu, the first click should open the menu and second click should dismiss the menu. This goes for all popup menus in the app. This isn't happening with the All Projects button.

  1. Click on All Projects
  2. Menu appears
  3. Click on All Projects again
  4. Menu should dismiss
  5. Instead menu dismisses and then immediately appears again

Activity

  1. maple-engineering commented on Sep 22, 2026

    @maple-engineering
    Contributor

    The second click on the All Projects header closes the menu and opens it again.

    switcher-menu uses on_mouse_down_out, which GPUI runs in the capture phase. That sets switcher_menu_open to false. The header's on_click then calls toggle_switcher_menu, sees the menu closed, and opens it. stop_propagation on the click runs after the outside handler.

    The same pairing is on the task and project overflow buttons, the header project chip, the composer model / mode / integrations chips, and the settings dropdowns.

    A capture-phase handler on the trigger can stop the press before the menu's outside handler and toggle there. The folder-plus control on the All Projects row needs to stay outside the toggle target.

  2. maple-engineering commented on Sep 22, 2026

    @maple-engineering
    Contributor

    Draft PR for this: #999

  3. added a commit that references this issue on Sep 24, 2026
    cef9054
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions