Skip to content

[CLOSED] Cannot remove menu dividers on Mac #5736

@core-ai-bot

Description

@core-ai-bot

Issue by lkcampbell
Sunday Dec 22, 2013 at 00:08 GMT
Originally opened as adobe/brackets#6300


OS Version: Mac OSX Mavericks

Brackets Version: Sprint 35

Background: The purpose of this issue is to provide a simulation of what occurs when I have attempted (unsuccessfully) to remove a menu divider from a Mac menu. Brackets menu divider ids are created by a counter to keep them unique. I chose a couple of high numbered ids (1000 and 1001) to decrease the chance of overwriting existing divider ids that may already be added to Brackets.

Scenario 1:
Open Brackets source code, then open Dev Tools to Console and paste the following code snippet into the Console:

brackets.app.addMenuItem("view-menu", "---", "brackets-menuDivider-1000", "", "", undefined, undefined, function (err) { console.log(err); });

Look at the view menu. There should be a divider added at the bottom.

Now paste the following code snippet in the Console:

brackets.app.removeMenuItem("view-menu-brackets-menuDivider-1000", function (err) { console.log(err); });

The menu divider has not been removed. It is still at the bottom of the view menu.

The number "3" is printed in the console log. brackets.app.removeMenuItem() has thrown an error.

Scenario 2:
Open Brackets source code, then open Dev Tools to Console and paste the following code snippet into the Console:

brackets.app.addMenuItem("view-menu", "---", "brackets-menuDivider-1001", "", "", undefined, undefined, function (err) { console.log(err); });

Look at the view menu. There should be a second divider added at the bottom.

Now paste the following code snippet in the Console:

brackets.app.removeMenuItem("brackets-menuDivider-1001", function (err) { console.log(err); });

The menu divider has not been removed. There are now two dividers at the bottom of the view menu.

The number "3" is printed in the console log. brackets.app.removeMenuItem() has thrown another error.

If I remember correctly, Scenario 2 works for Windows. I switched over to a Mac recently and can't currently test Windows, so any fix should be double checked for Windows as well.

Neither scenario works for Mac, so I need to know why there is a difference and what ID string I need to provide to successfully remove a menu divider in Mac.

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