Skip to content

Commit 6b8fff3

Browse files
authored
Custom context menu runs or selects action under mouse when opened (fix microsoft#189167) (microsoft#189311)
Custom context menu runs or selects action under mouse when opened (microsoft#189167)
1 parent c96d0c0 commit 6b8fff3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/vs/base/browser/ui/contextview/contextview.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,11 @@ export class ContextView extends Disposable {
296296
around = {
297297
top: anchor.posy,
298298
left: anchor.posx,
299-
width: 1,
299+
// We are about to position the context view where the mouse
300+
// cursor is. To prevent the view being exactly under the mouse
301+
// when showing and thus potentially triggering an action within,
302+
// we treat the mouse location like a small sized block element.
303+
width: 2,
300304
height: 2
301305
};
302306
}

0 commit comments

Comments
 (0)