Skip to content

Commit

Permalink
Merge pull request #6763 from vector-im/dbkr/fix_electron_menus
Browse files Browse the repository at this point in the history
Fix right click menu in electron
  • Loading branch information
dbkr authored May 18, 2018
2 parents 1e8bb5e + 6722eed commit e5fd579
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions electron_app/src/webcontents-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ function onLinkContextMenu(ev, params) {
clipboard.writeText(url);
},
}));
popupMenu.popup();
// popup() requires an options object even for no options
popupMenu.popup({});
ev.preventDefault();
}

Expand All @@ -88,7 +89,8 @@ function onSelectedContextMenu(ev, params) {
const items = _CutCopyPasteSelectContextMenus(params);
const popupMenu = Menu.buildFromTemplate(items);

popupMenu.popup();
// popup() requires an options object even for no options
popupMenu.popup({});
ev.preventDefault();
}

Expand All @@ -101,7 +103,8 @@ function onEditableContextMenu(ev, params) {

const popupMenu = Menu.buildFromTemplate(items);

popupMenu.popup();
// popup() requires an options object even for no options
popupMenu.popup({});
ev.preventDefault();
}

Expand Down

0 comments on commit e5fd579

Please sign in to comment.