Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First Item in submenu not working #256

Closed
jitendrachaudhariSiemens opened this issue Apr 25, 2024 · 3 comments
Closed

First Item in submenu not working #256

jitendrachaudhariSiemens opened this issue Apr 25, 2024 · 3 comments

Comments

@jitendrachaudhariSiemens

Problem Description

I added the toolbar with submenus.
const menuItemList : Array = [
{
label: "File",
submenu: [isMac ? { role: 'close' } : { role: 'quit' },
{ label: 'Save Analysis', role: 'menu', click: () => newWindow.webContents.send('menu-event', 'save')}]
},
{
label: "Help",
submenu: [
{
label: "About Us",
role: 'menu',
enabled: true,
click: async () => {
console.log("HIIIIIIIIIIIIIIIIIIIIIIIII");
}
},
{
label: "Resources",
click: async () => {
console.log("HIIIIIIIIIIIIIIIIIIIIIIIII");
}
},
{
label: "Contact Us",
click: async () => {
console.log("HIIIIIIIIIIIIIIIIIIIIIIIII");
}
},
{
label: "Report Bug",
click: async () => {
console.log("HIIIIIIIIIIIIIIIIIIIIIIIII");
}
}
]
}
]

all menus are clickable but first submmenu item doesnt call click function. In File first Exit menu works

Steps to Reproduce

versions
"custom-electron-titlebar": "^4.2.8",
"@angular/core": "^17.1.0",
"electron": "^28.1.4",
"electron-builder": "^24.9.1",

Expected Behavior

[Explain what the expected behavior of the project should be in this situation.]

Current Behavior

First submenu item is not clickable and doesnt call the click()

Additional Information

[Provide any other relevant information, such as your operating system, version of the project you are using, versions of dependencies, etc.]

Tentative Solution Steps

[If you have any ideas on how to fix this issue, share them here. If not, don't worry, the project team can help find a solution.]

Screenshots

[If relevant, you can attach screenshots that demonstrate the problem.]

Additional Context

[Add any other context that might be useful for understanding the issue, such as recent code changes, events that might have triggered the problem, etc.]

Note:
Labels - Select the appropriate labels that best describe this issue, such as "bug", "enhancement", "support", etc.

@jitendrachaudhariSiemens
Copy link
Author

@AlexTorresDev Could you update on this issue ?

@qiaolin-li
Copy link

Is the div where your first menu is located set the -webkit-app-region attribute? I also set this attribute last time so that the menu could not be clicked

@jitendrachaudhariSiemens
Copy link
Author

Yes you are spot on.. i have another header/banner with (-webkit-app-region) and it was causing this issue so removing this was solved my issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants