fix: crash when generating shortcut text for super accelerator (#44346)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: deepak1556 <hop2deep@gmail.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
parent
f003c1ea6a
commit
633cec167e
4 changed files with 66 additions and 1 deletions
|
@ -926,6 +926,20 @@ describe('Menu module', function () {
|
|||
});
|
||||
w.show();
|
||||
});
|
||||
|
||||
it('does not crash when rendering menu item with Super or meta accelerator', async () => {
|
||||
const menu = Menu.buildFromTemplate([{
|
||||
label: 'Test Super',
|
||||
accelerator: 'Super+Ctrl+T'
|
||||
}, {
|
||||
label: 'Test Meta',
|
||||
accelerator: 'Meta+Ctrl+T'
|
||||
}]);
|
||||
const menuWillClose = once(menu, 'menu-will-close');
|
||||
menu.popup({ window: w });
|
||||
menu.closePopup();
|
||||
await menuWillClose;
|
||||
});
|
||||
});
|
||||
|
||||
describe('Menu.setApplicationMenu', () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue