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 * @returns menu
*/ */
static processMenu(menu) { static processMenu(menu) {
menu.append(new MenuItem({ type: 'separator' }));
menu.append(new MenuItem({ let isLink = false;
role: 'reload', menu.items.map((item) => {
accelerator: 'CmdOrCtrl+R', if (item.label === 'Copy Link'){
label: 'Reload' 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; return menu;
} }