fix: crash when generating shortcut text for super accelerator (#44341)
This commit is contained in:
parent
cc9d85d3ca
commit
3e77faf2f7
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