-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Prevent default browser context-menu #6430
Conversation
Fixes #4007 Add additional handling to handle `contexmenu` events which would display the browsers default contextmenu which breaks up the user experience. The default browser `contextmenu` is thus disabled. Signed-off-by: Vincent Fugnitto <vincent.fugnitto@ericsson.com>
Tested in my local env. I confirm:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me, thank you !
I found #6431 when testing but I believe it is a separated issue. |
Hello @vince-fugnitto , I tested your pr and I see that after merge this one we are losing context menu for terminal. Maybe we should create separated issue to create context menu for terminal. |
@AndrienkoAleksandr I believe the proper fix for the terminal would be to create it's own context menu in which we can add new items. See #6216. I can hold off on this PR if you'd like until the context menu for the terminal is created. |
@AndrienkoAleksandr Could you elaborate why browser context menu is helpful for terminals till #6216 is fixed? |
Hello. I don't block merge this pr. I only applied information. Currently terminal context menu is useful only to copy and paste text, but we have shortcuts to do that. And yes, we need implement context menu. By the way Do we have an issue for that? And when we will implement context menu paste will be working only with electron. For browser version paste won't work for browser security reason. |
@vince-fugnitto, please make sure extension developers have an easy way to re-enable the context menus if they want to. |
I have just noticed, the context menu is not available anymore from We can do something similar the VS Code guys did, and enable only certain actions: electron/electron#4068 (Edit: I know the referenced issue is a bit off, I added to show that VS Code has support for the context menu in |
This occurs in
This is not in the scope of the PR. I am not adding context menus for widgets.
You likely do not have them because you do not have the additional VS Code extensions provided. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Item 1: context menu for "Toggle Maximized CTRL +M" is missing
OK, I will open an issue about it
Item 2:
Search View: We should have a context menu to "Copy/Paste" as minimal. I know we can use >>keyboard shortcut to copy/paste, but I would also prefer to have a minimal context menu for some >>commands .
This is not in the scope of the PR. I am not adding context menus for widgets.
By removing the context menu, you also remove the item for the copy/paste which was available on the old context menu. If the context menu is not provided with this PR, you can open a new issue to add it later, I am fine with it.
Item 3: my mistake
I don't have any real urgency in merging the PR, I'm concerned about the issues you described about how users don't have the contextmenu in |
I'll put the pull-request on hold until we complete the following:
|
What it does
Fixes #4007
Current Behavior
PR
window
contextmenu
event to prevent the default browser behavior. Existing context menus such as for an editor, or widgets remain unchanged.How to test
Verify Default Behavior
Verify Regression
Review checklist
Reminder for reviewers
Signed-off-by: Vincent Fugnitto vincent.fugnitto@ericsson.com