mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-17 05:55:00 +08:00
Merge pull request #6763 from vector-im/dbkr/fix_electron_menus
Fix right click menu in electron
This commit is contained in:
commit
e5fd579935
@ -61,7 +61,8 @@ function onLinkContextMenu(ev, params) {
|
|||||||
clipboard.writeText(url);
|
clipboard.writeText(url);
|
||||||
},
|
},
|
||||||
}));
|
}));
|
||||||
popupMenu.popup();
|
// popup() requires an options object even for no options
|
||||||
|
popupMenu.popup({});
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -88,7 +89,8 @@ function onSelectedContextMenu(ev, params) {
|
|||||||
const items = _CutCopyPasteSelectContextMenus(params);
|
const items = _CutCopyPasteSelectContextMenus(params);
|
||||||
const popupMenu = Menu.buildFromTemplate(items);
|
const popupMenu = Menu.buildFromTemplate(items);
|
||||||
|
|
||||||
popupMenu.popup();
|
// popup() requires an options object even for no options
|
||||||
|
popupMenu.popup({});
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -101,7 +103,8 @@ function onEditableContextMenu(ev, params) {
|
|||||||
|
|
||||||
const popupMenu = Menu.buildFromTemplate(items);
|
const popupMenu = Menu.buildFromTemplate(items);
|
||||||
|
|
||||||
popupMenu.popup();
|
// popup() requires an options object even for no options
|
||||||
|
popupMenu.popup({});
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user