fix(electron): cmd+num not working on mac (#7865)
fix AF-1248 hidden menu group + acceleratorWorksWhenHidden does not work on mac
This commit is contained in:
@@ -139,22 +139,19 @@ export function createApplicationMenu() {
|
|||||||
undoCloseTab().catch(console.error);
|
undoCloseTab().catch(console.error);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
...[1, 2, 3, 4, 5, 6, 7, 8, 9].map(n => {
|
||||||
label: 'Switch to tab',
|
const shortcut = `CommandOrControl+${n}`;
|
||||||
acceleratorWorksWhenHidden: true,
|
const listener = () => {
|
||||||
visible: false,
|
switchTab(n);
|
||||||
submenu: [1, 2, 3, 4, 5, 6, 7, 8, 9].map(n => {
|
};
|
||||||
const shortcut = `CommandOrControl+${n}`;
|
return {
|
||||||
const listener = () => {
|
acceleratorWorksWhenHidden: true,
|
||||||
switchTab(n);
|
label: `Switch to tab ${n}`,
|
||||||
};
|
accelerator: shortcut,
|
||||||
return {
|
click: listener,
|
||||||
label: `Switch to tab ${n}`,
|
visible: false,
|
||||||
accelerator: shortcut,
|
};
|
||||||
click: listener,
|
}),
|
||||||
};
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -154,7 +154,9 @@ async function enableSplitView(page: Page) {
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
await page.reload();
|
await page.reload({
|
||||||
|
timeout: 30000,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
test('open new tab via cmd+click page link', async ({ page }) => {
|
test('open new tab via cmd+click page link', async ({ page }) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user