Skip to content

Webview does not paste clipboard text correctly by pressing Shift+Insert #114103

Closed

Description

  • VSCode Version: 1.52.1 and earlier
  • OS Version: Linux Ubuntu 20.04
  • OS Version: Windows 10

The problem can be observed with any Webview panel.

Steps to Reproduce:

  1. Checkout Webview sample: vscode-extension-samples/webview-sample
  2. In file src/extension.ts add these two lines
@@ -199,6 +199,8 @@ class CatCodingPanel {
                        <body>
                                <img src="${catGifPath}" width="300" />
                                <h1 id="lines-of-code-counter">0</h1>
+                               <label for="input-text">Input:</label>
+                               <input type="text" id="input-text">
 
                                <script nonce="${nonce}" src="${scriptUri}"></script>
                        </body>
  1. Start Debugging of the extension and in the new window open command "Cat Coding: Start cat coding session"
  2. Focus on the "Input" text entry, type something and copy the text into the clipboard. In my case it is "123".
  3. Paste the text by "Ctrl+V". Observe that the inserted text is correct
  4. Paste the text by "Shift+Insert". Observe that the text is inserted twice. Expected - the text is inserted once

image

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

Activity

  1. added
    bug
    help wanted
    webview
    on Jan 16, 2021
  2. serge1 commented on Jan 18, 2021

    @serge1
    ContributorAuthor

    I have submitted a PR #114520 that fixes this issue

  3. added a commit that references this issue on Jan 19, 2021
    049735e
  4. added
    unreleased
    insiders-released
    and removed
    unreleased
    on Jan 19, 2021
  5. added
    verified
    on Jan 28, 2021
  6. locked and limited conversation to collaborators on Mar 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bughelp wantedinsiders-releasedverifiedwebview

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions