logseq-copy-code-plugin icon indicating copy to clipboard operation
logseq-copy-code-plugin copied to clipboard

Copy button no longer copies content after changing code block contents

Open Wouter-M opened this issue 4 months ago • 0 comments

Logseq version: 0.10.13 Copy Code plugin version: 1.2.0

Steps to reproduce:

  1. Create a code block, containing for example:
import os

something = "old code"
  1. Click the copy button on the block
  2. Establish that it copied correctly by pasting in another text editor
  3. Copy a random piece of text to the clipboard from anywhere, e.g. the text "some random stuff"
  4. Change the code block in logseq to, for example:
import os

something = "new code"
  1. Click the copy button again
  2. Paste again in an external text editor

Observed behavior The second click on the copy button did not copy anything to the clipboard. When pasting in the external editor (step 6), the text from step 4 appears ("some random stuff").

It appears, the copy button does not do anything, until after a restart of logseq.

Expected behavior Clicking the copy button on the code block in logseq, should copy the current text in the code block to the clipboard at all times.

Wouter-M avatar Sep 18 '25 08:09 Wouter-M