Skip to content

Submenus in a widget's right-click menu blink while editing the bar in place #582

Closed

Description

@M4n0x

What happens

While editing the bar in place, right-click any widget and rest the pointer on Move To or Shows On. The submenu closes and reopens over and over, so it blinks and is hard to use. It happens on every widget of a screen that has its own widget layout (screens.<kind>.layout), whenever something on the edit bar changes, such as a CPU or memory value changing width or another workspace getting focus.

Steps to reproduce

  1. Use a configuration that gives the screen kind its own layout and has a widget whose text changes width:

    {
      "widgets": [
        { "id": "apple", "type": "appleMenu", "position": "left" },
        { "id": "tick", "type": "script", "position": "center", "interval": 1,
          "command": "if [ $(( $(date +%s) % 2 )) = 0 ]; then echo short; else echo a-much-longer-text; fi" }
      ],
      "screens": { "monitor": { "layout": { "left": ["apple"], "center": ["tick"] } } }
    }
  2. Choose Edit Bar in Place, and on the external monitor right-click the Apple menu tile.

  3. Rest the pointer on Move To.

Expected

The submenu stays open until the pointer leaves it, as it does on a screen without its own layout.

Environment

  • StableBar 0.14.0-beta.20261111135953.922, and main at 09f1ab1
  • macOS 27.2
  • Built-in display with a notch, plus an external monitor with its own layout
  • AeroSpace

Evidence

A dev build ran the configuration above with the pointer resting on Move To:

  • The submenu's window closed and reopened three times in five seconds, each time right after the Apple tile redrew.
  • Every tile redrew about three times a second. Without the screens layout, the tiles drew twice in total, and the submenu stayed open.

Diagnosis

  • BarEditTile (Sources/StableBar/BarEditView.swift) stores the whole Configuration that BarEditView hands it: store.configuration?.onScreen(ScreenKind(display)).
  • For a screen with its own layout, Configuration.onScreen(_:) (Sources/StableBar/Configuration.swift) builds a new widgets array on every call. Configuration isn't Equatable, so SwiftUI counts each rebuilt one as a change.
  • Every update of the edit bar then redraws every tile. A redraw re-evaluates the tile's .contextMenu, SwiftUI replaces the items of the open menu, and an open submenu closes. The next pointer move opens it again.
  • Without a screen layout, onScreen(_:) keeps the same widgets array, and the tiles don't redraw.

Related

None found. Issues and pull requests were searched in every state for submenu, blink, flicker, context menu, Move To and Shows On.

Triaged by Claude Code (Claude Opus 5.5).

Activity

  1. added
    bug
    on Nov 11, 2026
  2. stablebar-releases commented on Nov 12, 2026

    @stablebar-releases

    🎉 This issue has been resolved in version 0.14.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

    bugreleased

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions