mirror of
https://github.com/finos/SymphonyElectron.git
synced 2026-08-04 10:23:18 -05:00
Electron-114 - Added a condition to not include reload in context menu when clicked on links
This commit is contained in:
committed by
Kiran Niranjan
parent
0d859de70f
commit
94ef8905f2
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user