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

Menu shown on Alt on the main window, but is always shown in a new one. #765

Open
Yopai opened this issue Mar 12, 2019 · 2 comments
Open

Menu shown on Alt on the main window, but is always shown in a new one. #765

Yopai opened this issue Mar 12, 2019 · 2 comments
Labels
bug

Comments

@Yopai
Copy link

@Yopai Yopai commented Mar 12, 2019

Description

System menu behaviour shows inconsistency between the main window and an "open in new window" one

Steps to reproduce issue

  • Open any nativefied app
  • Observe the menu is hidden (and appears only when pressing Alt)
  • Right click on a link > Open in new Window
  • In the just-opened window, observe the menu is always shown.

Not really a big thing, but inconsistent. The menu should behave the same (either always shown, or shown only when pressing Alt) in both cases.

Note that I have no sufficient knowledge of Electron's development to know if it's due to the nativefier code (a missing setting of autoHideMenuBar when creating the new window) or if it's a bug of electron's itself.

Details

  • No matter the site
  • It's a bug. If --show-menu-bar is not given, the menu behaviour should be the same in both cases.
  • nativefier v7.6.9
  • node v8.10.0
  • OS: Linux (Ubuntu)
  • No error message

(Anyway, just wanted to say nativefier is an invaluable tool ! Thanks a lot !)

@Yopai
Copy link
Author

@Yopai Yopai commented Mar 12, 2019

Same behaviour with nativefier -e 3.1.3

@Yopai
Copy link
Author

@Yopai Yopai commented Mar 12, 2019

I searched through the code, here's what I found in mainWindow.js :

  // line 96
  const mainWindow = new BrowserWindow(
    Object.assign(
      {
        ...
        autoHideMenuBar: !options.showMenuBar,
        ...
      },
      DEFAULT_WINDOW_OPTIONS,
    ),
  );
   // line 268, in createNewWindow
   const window = new BrowserWindow(DEFAULT_WINDOW_OPTIONS);

As far as I understand, the autoHideMenuBar option (at least) should be also passed to new BrowserWindow in createNewWindow, maybe by integrating it in DEFAULT_WINDOW_OPTIONS.

@ronjouch ronjouch added the bug label Apr 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.