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:
Vishwas Shashidhar 2017-08-22 21:29:42 +05:30
commit 8aa5f50459

View File

@ -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;
}