James-Yu / LaTeX-Workshop

Boost LaTeX typesetting efficiency with preview, compile, autocomplete, colorize, and more.
MIT License
10.47k stars 519 forks source link

Cannot copy text from pdf viewer after updating and restarting any extension #4248

Closed anf4108 closed 3 months ago

anf4108 commented 3 months ago

Please fill the following fields with a star (*) and provide as much related information as possible.

Pre-checks*

Please change the following [ ] to [x] for confirmation.

  • [x] The issue has not been reported in this repository.
  • [ ] The issue remains after disabling all other extensions and restarting Visual Studio Code.
  • [x] The FAQ cannot address the issue.
  • [x] The issue is not related to compiling a document, or the document can be successfully compiled in the OS terminal but not in Visual Studio Code with this extension.

Environment*

Please write exact version numbers instead of descriptors such as latest.

  • Operating System: [macOS Sonoma 14.4.1]
  • Visual Studio Code Version: [1.88.1]
  • LaTeX Workshop Version: [9.20.0]
  • TeX Distribution Version: [TeX Live 2022]

Please list the environment and version number if you are using VSCodium, Snap or Flatpack versions of Visual Studio Code, and/or Visual Studio Code Remote Containers/SSH/WSL.

  • I am using XXX whose version is YY.ZZ

The Issue*

Please briefly describe the issue you come across.

  • Cannot copy text from pdf viewer after updating and restarting any extension.
  • This promblem likely came out after the VSCode March 2024 update. After pressing "update" and "Restart Extension" of any extension to update it, I cannot use cmd-C to copy the text content from the PDF. However, I can click the "Edit-Copy" from the toolbar as an alternative. After restarting vscode, it will be fine again.

Reproduction Steps

Please list out the steps to reproduce your bug. Include relevant environmental variables or any other configuration.

  1. Open a pdf file, select text and copy with cmd-C. It's ok. Screenshot 2024-04-25 at 22 10 13
  2. When a extension is ready to update, click the "update" and then "restart extension" to update the extension without restart the whole vscode. Screenshot 2024-04-25 at 22 11 30
  1. Copy different text, but then cmd-C is disabled actually.

    Screenshot 2024-04-25 at 22 12 01
  2. Click "Edit-Copy", it works normally.

    Screenshot 2024-04-25 at 22 22 45

Expected Behavior

What were you expecting to see? Include any relevant examples or documentation links.

  • Be able to copy text from pdf viewer normally at any time.

Logs

LaTeX Workshop Output*

Please paste the whole log messages below, not parts of ones. The log should start with New log placeholder %WS1% registered.

[Paste the log here. Do not remove the surrounding backquotes (`).]

Developer Tools Console

Please paste the whole log messages below, not parts of ones. This console logs can sometimes be very important in many cases. To access the log, click Help -> Toggle Developer Tools -> Console.

[Paste the log here. Do not remove the surrounding backquotes (`).]

Anything Else?

Add any other context about the problem below.

  • I don't no which caused this problem: the extension itself, vscode, or pdf.js?
  • By the way, the copy shortcuts also have problem while using ssh. When I use ssh to open pdf on Ubuntu with vscode and LaTeX-Workshop, I must use ctrl-C to copy text instead of cmd-C, while copying in other files is still cmd-C.
James-Yu commented 3 months ago

Very likely that you need to reopen the pdf tab.

Please include logs.