Vscode: Double pasting in a webview with latest insiders

Created on 8 Jul 2020  路  23Comments  路  Source: microsoft/vscode




  • VSCode Version:Version: 1.47.0-insider (user setup)
    Commit: d5e9aa0227e057a60c82568bf31c04730dc15dcd
    Date: 2020-07-08T10:52:52.439Z
    Electron: 7.3.2
    Chrome: 78.0.3904.130
    Node.js: 12.8.1
    V8: 7.8.279.23-electron.0
    OS: Windows_NT x64 10.0.19041

Steps to Reproduce:

  1. Download the vscode extension samples: (https://github.com/microsoft/vscode-extension-samples.git)
  2. Modify the html in the cat coding webview sample to have a <textarea>
  3. Run the cat coding webview
  4. Paste some text into the text area.

It will double paste. Double cut seems to happen too.

Root cause seems to be this commit id:
https://github.com/microsoft/vscode/commit/85402615934f3c8b97ad14d8c483383833287a82 as found by @dimitry-ishenko

This is causing these two issues in the python extension:
https://github.com/microsoft/vscode-python/issues/11796
https://github.com/microsoft/vscode-python/issues/12808


Does this issue occur when all extensions are disabled?: NA

bug candidate custom-editors insiders-released linux verified windows

Most helpful comment

This would be the first 1.48 insiders build (which should be out tomorrow)

All 23 comments

Doesn't seem to repo on MacOS. Will take a look into Windows and Linux

The repro may be timing dependent. I can repro locally but others on the team cannot.

Debugging it shows a double paste event firing inside of the text area.

I can hit this reliably on Windows. This is a result of us enabling the copy/paste menu bar commands for webviews + the usage of a custom title bar (which is the default on windows)

@rchiodo Please test the next VS Code 1.48 insiders that includes f37faf6. This is the more scoped fix that we will consider taking into a 1.47 recovery build

101958 has a better fix but is more risky. We will likely merge it into insiders for feedback and target shipping it in 1.48

I assume that would be tomorrow's build? Or is there a way I can just install that commit?

This would be the first 1.48 insiders build (which should be out tomorrow)

Insiders version 1.48.0-1594382675 has trickled out to Ubuntu and I can confirm that this bug is now handled.

Well, this has hit people like a freight train... Hope this is released soon in stable.

@mjbvz FYI there is a report here that this fix neuters Ctrl + C/V on Mac altogether.

I had the same issue now when I was code in Jupyter Notebook:

_Version: 1.47.0 (user setup)
Commit: d5e9aa0227e057a60c82568bf31c04730dc15dcd
Date: 2020-07-09T08:02:06.629Z
Electron: 7.3.2
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Windows_NT x64 10.0.18362_

Verified on Windows

Verifying on macos

Cool that somebody else found this issue! I searched a lot on the internet to see if I was doing something wrong haha
Thanks for fixing it guys. I appreciate.

Wow can this be fixed ASAP please. This is crazy annoying.

This issue still happen on Linux

This bug still occurs in version (windows 1.48.0-insider) insiders but only happens if you "select text and right click then copy and paste" when I use keyboard "ctrl+c then ctrl+v" it doesn't duplicate, hmm that's quite strange?

Note: if you feel very annoyed with this problem, you can fix it temporarily by removing "Keyboard Shortcut" so that only one copy is copied via https://github.com/microsoft/vscode-python/issues/11796#issuecomment-658563757

Version: 1.48.0-insider (user setup)
Commit: 62503719349d04686a0704f7646b761aaf495b3d
Date: 2020-08-04T05:32:46.194Z
Electron: 7.3.2
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Windows_NT x64 10.0.20180

This bug still occurs in version (windows 1.48.0-insider) insiders but only happens if you "select text and right click then copy and paste" when I use keyboard "ctrl+c then ctrl+v" it doesn't duplicate, hmm that's quite strange?

@akbaryahya can you elaborate more on this one? How do you "right click then copy and paste"? Currently I'm not seeing any context menu when right click in a python notebook.

When is the ctrl+c / ctrl+v bug going to be fixed?

When is the ctrl+c / ctrl+v bug going to be fixed?

It has already been fixed on v1.47.2 for Windows. What are your OS and VSCode versions?

Ubuntu 20.04 and it鈥檚 broken in whatever the current release is 1.47.#

This bug still occurs in version (windows 1.48.0-insider) insiders but only happens if you "select text and right click then copy and paste" when I use keyboard "ctrl+c then ctrl+v" it doesn't duplicate, hmm that's quite strange?

@akbaryahya can you elaborate more on this one? How do you "right click then copy and paste"? Currently I'm not seeing any context menu when right click in a python notebook.

https://www.youtube.com/watch?v=dPItce2zMD8 this is an example video when I copy/paste, i actually writing in php but I'm using a trick from vscode-python discussion to get a fix temporary problem.

@akbaryahya what you shared above looks bad, thanks for the video, it helps me understand it better. Are you seeing this in latest Insiders all the time? For example, can you reproduce this issue by "F1 -> Reload Window" and then copy/paste immediately?

@AllanOricil it wasn't fixed on 1.47.2 on Windows or Linux. But just upgraded to 1.48 today on both Windows and Linux and it's now resolved.

This seems to have fixed my issue https://github.com/microsoft/vscode-python/issues/13445 as well

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mariusa picture mariusa  路  219Comments

Tyriar picture Tyriar  路  200Comments

hsdk123 picture hsdk123  路  263Comments

fabiopicchi picture fabiopicchi  路  192Comments

Brakkar picture Brakkar  路  364Comments