Skip to content

Intellij Idea Keybindings clipboardPasteAction not found #1105

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

Closed
NickBolles opened this issue Oct 24, 2019 · 23 comments
Closed

Intellij Idea Keybindings clipboardPasteAction not found #1105

NickBolles opened this issue Oct 24, 2019 · 23 comments
Labels
bug Something isn't working
Milestone

Comments

@NickBolles
Copy link

  • code-server version:
code-server --version
v10.15.1

Description

When pasting in the editor I get a "editor.action.clipboardPasteAction' not found toast notification and pasting fails. But copying works successfully.

I can also copy and paste just fine in the terminal.

Issue on the extension repo: kasecato/vscode-intellij-idea-keybindings#163

Steps to Reproduce

@code-asher
Copy link
Member

Interesting, looks like VS Code web doesn't support that command at the moment. I imagine they could do it with the clipboard API but they only use that for the terminal at the moment.

@NickBolles
Copy link
Author

For anyone else finding this, I just overrode this keybinding with the following in my keybindings.json file

  // Remove incompatible paste action
  {
    "key": "ctrl+v",
    "command": "-editor.action.clipboardPasteAction",
    "when": "editorTextFocus && !editorReadonly"
  },

@melroy89
Copy link

melroy89 commented Nov 1, 2019

Uh.. yup something is wrong. I'm using v2 of code-server.

image

@code-asher
Copy link
Member

You might be running into this: #1106

If so, the best solution is to use HTTPS. There's a workaround for pasting but I'm not sure there's one for copying (it might work to just unbind it).

@melroy89
Copy link

melroy89 commented Nov 1, 2019

I'm using HTTPS. But I'm using Nginx reverse proxy in between.

EDIT: Lets put it differently, I do not need the HTTPS from code-server. I can use plain communication between Nginx and the localhost:8080, and my separate Nginx reverse proxy server is taking care of the SSL stuff (which is running on port 443, publicly available).

@code-asher
Copy link
Member

EDIT: Lets put it differently, I do not need the HTTPS from code-server. I can use plain communication between Nginx and the localhost:8080, and my separate Nginx reverse proxy server is taking care of the SSL stuff (which is running on port 443, publicly available).

That sounds good; I use the same setup. As long as the browser itself is seeing an HTTPS all is well. But I realized I missed some information about Firefox so I elaborated here: #1106 (comment)

@ghost
Copy link

ghost commented Nov 24, 2019

Should note that pasting works fine when nothing is selected. It's only when things are selected that you get this error.

@NickBolles
Copy link
Author

Should note that pasting works fine when nothing is selected. It's only when things are selected that you get this error.

My initial issue was happening whether or not I had anything selected. That issue is resolved (by removing the command in the intellij extension). Maybe we should create a new issue for any other root causes.

@nhooyr
Copy link
Contributor

nhooyr commented Feb 3, 2020

Upstream issue.

@nhooyr nhooyr added upstream Needs to be fixed upstream bug Something isn't working and removed needs-investigation labels Feb 3, 2020
@nhooyr nhooyr removed the upstream Needs to be fixed upstream label Apr 16, 2020
@nhooyr
Copy link
Contributor

nhooyr commented Apr 16, 2020

Not really an upstream issue, we should just patch it, it'd be really easy afaik.

@nhooyr
Copy link
Contributor

nhooyr commented Apr 16, 2020

Only for chromium based browsers and Firefox though, safari doesn't support the clipboard API we'd need.

@nhooyr
Copy link
Contributor

nhooyr commented Apr 16, 2020

Or actually, I wonder what they do for the terminal in Safari.

@nhooyr nhooyr self-assigned this Apr 16, 2020
@nhooyr
Copy link
Contributor

nhooyr commented Apr 17, 2020

Yea I'm actually confused how the terminal supports copying since it's rendering to a canvas so I can't select any text and so document.execCommand("copy") wouldn't work.

@nhooyr
Copy link
Contributor

nhooyr commented Apr 17, 2020

Figured it out. See https://github.com/xtermjs/xterm.js/blob/7f598a36753f4d950ee63dc91bd6a92290f7e037/src/browser/Clipboard.ts

They have a DOM element they populate right before a selection occurs to ensure the DOM is in sync with what's actually being selected.

@nhooyr
Copy link
Contributor

nhooyr commented Apr 17, 2020

Oh, nvm, check this out: https://developer.mozilla.org/en-US/docs/Web/API/Element/copy_event

That's what they're using. Not sure what the above is about then.

@nhooyr
Copy link
Contributor

nhooyr commented Apr 17, 2020

@nhooyr nhooyr added this to the v3.5.0 milestone Jun 3, 2020
@nhooyr nhooyr removed their assignment Aug 25, 2020
@nhooyr nhooyr modified the milestones: v3.5.0, v3.5.1 Aug 25, 2020
@hjfreyer
Copy link

FYI, I'm running into this when trying to use an extension that explicitly calls editor.action.clipboardPasteAction.

@jsjoeio
Copy link
Contributor

jsjoeio commented Mar 18, 2021

Sorry to hear that @hjfreyer - do you mind providing your OS information and reproduction steps? You can see an example in the bug-report issue template here

@hjfreyer
Copy link

Repro steps are in yzhang-gh/vscode-markdown#917.

OS/Web Information

  • Web Browser: Chrome
  • Local OS: Chrome OS 89.0.4389.82 (Official Build) (64-bit)
  • Remote OS: Debian (not exactly, but close enough)
  • Remote Architecture: amd64
  • code-server --version:
[2021-03-22T17:01:17.182Z] info  Using config file ~/.config/code-server/config.yaml
3.5.0 de41646fc402b968ca6d555fdf2da7de9554d28a

@jsjoeio jsjoeio added this to the v3.9.3 milestone Mar 22, 2021
@jsjoeio jsjoeio added the needs-investigation This issue needs to be further investigated label Mar 22, 2021
@jsjoeio jsjoeio modified the milestones: v3.9.3, On Deck Mar 22, 2021
@stale
Copy link

stale bot commented Sep 19, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no activity occurs in the next 5 days.

@stale
Copy link

stale bot commented Mar 23, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no activity occurs in the next 5 days.

@hacker1024
Copy link

This is still relevant.

@jsjoeio jsjoeio reopened this Jan 3, 2023
@code-asher
Copy link
Member

We are closing out old issues but let me know if this is still an issue. That said, it is probably not something we can fix, likely it is an issue in VS Code core.

@code-asher code-asher closed this as not planned Won't fix, can't repro, duplicate, stale Jul 11, 2024
@code-asher code-asher removed the needs-investigation This issue needs to be further investigated label Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants