mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-12-27 17:31:36 -06:00
Merge branch 'master' into electron-113
* master: Electron-114 - Added a condition to not include reload in context menu when clicked on links
This commit is contained in:
commit
8aa5f50459
@ -41,12 +41,23 @@ class SpellCheckHelper {
|
||||
* @returns menu
|
||||
*/
|
||||
static processMenu(menu) {
|
||||
menu.append(new MenuItem({ type: 'separator' }));
|
||||
menu.append(new MenuItem({
|
||||
role: 'reload',
|
||||
accelerator: 'CmdOrCtrl+R',
|
||||
label: 'Reload'
|
||||
}));
|
||||
|
||||
let isLink = false;
|
||||
menu.items.map((item) => {
|
||||
if (item.label === 'Copy Link'){
|
||||
isLink = true;
|
||||
}
|
||||
return item;
|
||||
});
|
||||
|
||||
if (!isLink){
|
||||
menu.append(new MenuItem({ type: 'separator' }));
|
||||
menu.append(new MenuItem({
|
||||
role: 'reload',
|
||||
accelerator: 'CmdOrCtrl+R',
|
||||
label: 'Reload'
|
||||
}));
|
||||
}
|
||||
return menu;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user