Skip to content

Clicking a submenu item from the App menus tray closes the menus without choosing it #942

Done

Description

@MaHofseth

What happens

With Expand on hover on and too little room for the menus to expand, App menus open from a tray under the bar. Pressing the mouse in a submenu opened from there closes the tray before the mouse comes up, so the item isn't chosen.

Steps to reproduce

Found in the code and an automated test; not reproduced by hand on a release.

  1. Turn on Expand on hover for App menus where the titles don't fit beside them.
  2. Open a menu from the tray, then one of its submenus, such as View > Appearance in VS Code.
  3. Click an item in the submenu.

Expected

The item is chosen.

Environment

Found in StableBar 0.19.0's code while investigating another app menu bug on macOS 27.2.1.

Evidence

A test with the real tray and menu popups, and a submenu window attached to the menu, fails on main: a mouse-down in the submenu closes the tray. With a local fix, it passes. In a local build with this fix and a separate keyboard-focus fix, View > Appearance > Primary Side Bar chosen through the tray worked in VS Code.

Diagnosis

On main (8590fcd), the tray's event monitor in Sources/StableBar/Popups/WidgetPopup.swift ignores only windows whose direct parent is the tray. A menu opened from the tray is the tray's child, and its submenus are the menu's children, two windows above the tray. So the tray treats a mouse-down there as a click outside and closes. Closing the tray also closes the menu and its submenus, through BarStore.setPopupVisibleWidget.

Related

#312 and #453 concern fitting app menus beside the notch, not clicks.

Triaged by Claude Code (Claude Sonnet 5.5; drafts revised with Claude Opus 5.5).

Activity

  1. added
    needs-triage
    on Nov 25, 2026
  2. added
    bug
    P2
    and removed
    needs-triage
    on Nov 26, 2026
  3. stablebar-releases commented on Nov 29, 2026

    @stablebar-releases

    🎉 This issue has been resolved in version 0.20.0 🎉

    The release is available on GitHub release

    Your semantic-release bot 📦🚀

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

    P2bugreleased

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions