Skip to content
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

Support minimal context menu for text selected within extension README #65310

Closed
gjsjohnmurray opened this issue Dec 18, 2018 · 8 comments
Closed
Assignees
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities insiders-released Patch has been released in VS Code Insiders verification-found Issue verification failed verification-needed Verification of issue is requested verified Verification succeeded webview Webview issues
Milestone

Comments

@gjsjohnmurray
Copy link
Contributor

The README for my extension includes several text fragments designed for copying into settings.json. But when I highlight the text and right-click on it, no context menu appears.

It turns out that the usual Ctrl+C key sequence (I'm testing on Windows) does copy the selection to the clipboard. But I wish the right-click would offer a context menu with a 'Copy' option.

@vscodebot vscodebot bot added the editor-clipboard Editor clipboard issues label Dec 18, 2018
@alexdima alexdima removed the editor-clipboard Editor clipboard issues label Dec 18, 2018
@mjbvz mjbvz added feature-request Request for new features or functionality webview Webview issues labels Dec 18, 2018
@gjsjohnmurray gjsjohnmurray changed the title Support minimal context menu for text selected withing extension README Support minimal context menu for text selected within extension README Jan 24, 2019
@mjbvz mjbvz added the help wanted Issues identified as good community contribution opportunities label Mar 13, 2020
@gjsjohnmurray
Copy link
Contributor Author

@mjbvz now that you've closed #86658 maybe we can get this one tackled too. You tagged it 'help wanted', so I might take a look at it. Any pointers?

@mjbvz mjbvz added the verification-needed Verification of issue is requested label May 6, 2021
@mjbvz mjbvz closed this as completed in 78871c9 May 6, 2021
@mjbvz mjbvz added this to the May 2021 milestone May 6, 2021
@mjbvz
Copy link
Collaborator

mjbvz commented May 6, 2021

I've added cut, copy, and paste actions to the menu. We can consider adding additional actions based on demand (including potentially contributed ones #54285)

@rzhao271
Copy link
Contributor

rzhao271 commented Jun 1, 2021

Reopening because it seems that copying using the context menu option doesn't get the text into the clipboard?
recording (26)

@rzhao271 rzhao271 reopened this Jun 1, 2021
@mjbvz mjbvz closed this as completed in d215fc7 Jun 2, 2021
@rzhao271
Copy link
Contributor

rzhao271 commented Jun 3, 2021

@mjbvz I'm still unable to copy-paste with the context menu.
I wonder if focus is being lost to the point where activeEditor isn't even set?

@JacksonKearl
Copy link
Contributor

JacksonKearl commented Jun 4, 2021

Works fine for me on macOS, confirmed still not working on windows.

@JacksonKearl JacksonKearl added verified Verification succeeded and removed verified Verification succeeded labels Jun 4, 2021
@mjbvz
Copy link
Collaborator

mjbvz commented Jun 4, 2021

Also seems to work for me on Windows: a62df5d

The fix I checked in yesterday was Windows and Linux specific. I believe it always worked on MacOS

@bpasero
Copy link
Member

bpasero commented Jun 4, 2021

@mjbvz fyi we have a standard context menu that we show in all input fields:

image

I am not sure if you can detect whether the thing under the mouse is editable (= input field) or not and then show either this context menu or one with only things that work in readonly contexts (e.g. not "Cut").

@bpasero bpasero added the verified Verification succeeded label Jun 4, 2021
@bpasero
Copy link
Member

bpasero commented Jun 4, 2021

Verified for macOS. If you want cross OS coverage, I suggest a test plan item.

@github-actions github-actions bot locked and limited conversation to collaborators Jul 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities insiders-released Patch has been released in VS Code Insiders verification-found Issue verification failed verification-needed Verification of issue is requested verified Verification succeeded webview Webview issues
Projects
None yet
Development

No branches or pull requests

7 participants
@bpasero @alexdima @gjsjohnmurray @rzhao271 @JacksonKearl @mjbvz and others