context menu - add comment for when position is undefined

This commit is contained in:
Benjamin Pasero
2023-07-24 16:36:45 +02:00
parent fbefd6c2ee
commit e6648263fa
@@ -158,6 +158,9 @@ class NativeContextMenuService extends Disposable implements IContextMenuService
} else if (isAnchor(anchor)) {
x = anchor.x;
y = anchor.y;
} else {
// We leave x/y undefined in this case which will result in
// Electron taking care of opening the menu at the cursor position.
}
if (typeof x === 'number') {