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

Shortcut keys do not work when menu items are inserted rather than appended #3198

Closed
brzpegasus opened this issue Mar 8, 2015 · 3 comments
Closed
Labels

Comments

@brzpegasus
Copy link

When adding a menu item via insert() instead of append(), shortcut keys do not work. In the following example, pressing ctrl+s does nothing at all. However, if I replace menubar.insert(fileMenu, 0) with menubar.append(fileMenu), then it works.

  var menubar = new gui.Menu({ type: 'menubar' });

  var fileSubmenu = new gui.Menu();
  fileSubmenu.append(new gui.MenuItem({
    label: 'Save',
    key: 's',
    modifiers: 'ctrl',
    click: function() {
      alert('saving');
    }
  }));

  var fileMenu = new gui.MenuItem({ label: 'FileMenu', submenu: fileSubmenu });

  menubar.insert(fileMenu, 0);

This seems to be an issue on Windows only. I've observed this behavior on Windows 7, both with node-webkit-v0.11.6-win-x64 and nwjs-v0.12.0-win-x64.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@imzc
Copy link

imzc commented Sep 9, 2015

I got same issue on windows 10 on nwjs-v0.12.3

@Christywl
Copy link
Contributor

Works fine on Linux/Windows with nwjs-sdk-v0.24.0. Please try the latest nwjs build.

@Christywl
Copy link
Contributor

close until there is more information.

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

No branches or pull requests

3 participants