Skip to content

[Bug]: NSStatusItem doesn't maintain position in menubar across launches #42154

@rudyrichter

Description

@rudyrichter

Preflight Checklist

Electron Version

29/30

What operating system are you using?

macOS

Operating System Version

macOS 14

What arch are you using?

arm64 (including Apple Silicon)

Last Known Working Electron version

No response

Expected Behavior

relocating the menubar icon by holding down the command key and click/draging the icon to a new position in the menubar should save that location and result in it maintaining that location across launches.

Actual Behavior

upon quitting the application and launching it again, the icon displays left-most in the status area of the menubar instead of where you relocated it.

Testcase Gist URL

No response

Additional Information

It is recommended that the NSStatusItem have its autosave name set rather than letting the system assign one, this can be done in the initWithIcon method in shell/browser/ui/tray_icon_cocoa.mm

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions