-
Notifications
You must be signed in to change notification settings - Fork 27.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve context view placement around box #57399
Comments
@joaomoreno sorry, I can't repro this on windows and I don't have access to my Linux VMs while traveling. Also, could you point me to where the nudging down happens so I can add left and right? I was looking in |
The nudging happens here: https://github.com/Microsoft/vscode/blob/master/src/vs/editor/contrib/contextmenu/contextmenu.ts#L99 This appears to be a bad place to do it, since it only affects editor context menus. I was able to fix my problem by adding 2 to the |
This seems to not be a problem on Windows where the menu does not seem to open on mouse down. |
Talking with @joaomoreno, needs support from the context view component. |
Can confirm. If I right-click to open the context menu and the cursor ends up somewhere in the middle of the menu, the action under the cursor gets executed. I can avoid this if I keep the mouse button down, though. |
On Linux.
If I open the editor context menu in a small enough window, the action right below the mouse cursor will be executed instantly, since the change that makes an action run on mouse up. We should nudge the menu 1px to the side (to the right when on the right side, to the left when on the left) in order not to have the menu right below the mouse cursor.
It doesn't repro if the window is large enough since the menu will be 1px nudged down in that case.
The text was updated successfully, but these errors were encountered: