Skip to content

Commit 7cd4740

Browse files
authored
Fix right clicks triggers native context menu on macOS (#38)
Also reported here mhutchie#870
1 parent 1af2079 commit 7cd4740

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

web/contextMenu.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,11 @@ class ContextMenu {
100100
e.stopPropagation();
101101
});
102102

103+
menu.addEventListener('contextmenu', (e) => {
104+
// The user right-clicked on the context menu => keep the context menu open
105+
e.stopPropagation();
106+
});
107+
103108
this.target = target;
104109
if (this.target !== null && this.target.type !== TargetType.Repo) {
105110
alterClass(this.target.elem, CLASS_CONTEXT_MENU_ACTIVE, true);

0 commit comments

Comments
 (0)