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
Disabled/hidden menu appears anyway after upgrade to 4.0.0-beta.8 #15901
Comments
👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can. To help make it easier for us to investigate your issue, please follow the contributing guidelines. |
This is possibly fixed by #15878 which will be in Could you please retest with that once it's released? |
OH -- also, thank you for testing your app with the betas! ❤️ |
Yes, #15878 does explain why the menu looks invisible (font color is wrong). But it doesn't explain why menu shows up in the first place since it's disabled and properly didn't show up in beta.7 and earlier. I create the window like this:
This was when I started electron So it's probably not a big issue, but still a bit surprising and it's a change from the earlier releases. |
There was the same problem introduced with 3.0.8 #15601 and it got fixed there. But now the final v4 release is affected. |
I can confirm that this was working in 3.10 but is not working in 4.0.0 on Windows and Linux. var browserWindow = new Electron.BrowserWindow(options); In my case I have one browser window that should have a menu and several others -- acting as modeless dialogs for preferences and tools -- that should not. I use setMenu(null) on these modeless windows. |
Same issue here after updating to 4.0.0 on Arch Linux with KDE Plasma 5. |
Any info regarding this? setMenu(null) is not working at all. "electron": "^4.0.1" on macOS |
stumbled onto same issue. v4.0.1 on linux |
As an ugly workaround, you can set autoHideMenuBar to true creating the BrowserWindow. So menu will remain hidden until user presses alt key. |
I have a similar issue (menu is always visible despite |
After you've done the above, an even uglier workaround is to disable the alt key press -
Tested this on 4.0.8 and works 💃 |
The work-around I am using is to call |
@jacobq yep you're missing the fact that it does not work on Ubuntu Linux. The only way to hide the menu is to pass |
Really? Try my minimal demo here. It works for me on Debian. What is the difference? |
@jacobq Try hiding for a child window |
Thank you for taking the time to report this issue and helping to make Electron better. The version of Electron you reported this on has been superseded by newer releases. If you're still experiencing this issue in Electron 6.x.y or later, please add a comment specifying the version you're testing with and any other new information that a maintainer trying to reproduce the issue should know. I'm setting the Thanks in advance! Your help is appreciated. |
This is the code that hid the menu from the window. It was working in 3.10 but broke in 4.0.0 --
I have just now tested this on these versions all of which still exhibit the broken behavior:
This ticket should be kept opened. |
Does the |
"We completely ignored this issue for nearly two years, please test again if it magically disappeared so we can keep ignoring it.Thanks, your truly. useless bot." |
@jacobq The There appears to be two scenarios intermingled in this discussion. The one I'm reporting is where I have an application window that does have a menu, and a second window, for informational purposes, that does not. This is the desired pseudo code:
|
OK, so IIUC the reason in your case is that Would you be willing to share an electron-fiddle demonstrating the problem? I would be curious to see it since I have run into similar problems in the past but was always able to work around them somehow (e.g. wait for ready event). |
I have worked through the issue stripping down the code to bare essentials, TL;DR I am now satisfied that The longer story is that my app has a lengthy initialization phase (approximately 1000ms to 1500ms depending on the file it's opening), which causes a race condition between creating the menu with It would be OK with me to close this ticket, but the real solution would be to change |
The Electron version reported on this issue is no longer supported. See our supported versions documentation. If this is still reproducible on a supported version, please open a new issue with any other new information that a maintainer should know. Thank you for taking the time to report this issue and helping to make Electron better! Your help is appreciated. |
node_modules/.bin/electron --version
: v4.0.0-beta.8node_modules/.bin/electron --version
on last known working Electron version (if applicable): v4.0.0-beta.7Expected Behavior
No application menu appears.
Actual behavior
Menu appeared, additionally it's invisible before clicking on it (see screenshots).
To Reproduce
Screenshots
The weird thick title bar is actually a menu after clicking on it:
This is the menu after clicking on it:
Additional Information
To be clear my app doesn't have any app menu so the menu isn't enabled. This worked as expected with 4.0.0-beta.7 and earlier versions.
The text was updated successfully, but these errors were encountered: