[Bug Report]: Linux Xterm secodary clipboard not working on Code Blocks #2513

Closed
opened 2026-02-05 04:22:26 +03:00 by OVERLORD · 6 comments
Owner

Originally created by @a1466d44-d3dc-4c0b-90c7-315b088731d7 on GitHub (Nov 30, 2021).

Describe the Bug

Xterm secondary clipboard (select with mouse, then paste anywhere with middle mouse button) does not work on Code Blocks
Normal Text works just fine

Steps to Reproduce

  1. Use Linux (Kubuntu in my case)
  2. Create or open any page
  3. Create or find a Code block
  4. Mark text from inside the code block with Mouse
  5. try to paste selected text with middle mouse button anywhere else (like a Console window for example)

Expected Behaviour

Paste selected Text as i normaly would

Screenshots or Additional Context

Issue is only Linux related

Exact BookStack Version

v21.11.1 (but basicaly everyone)

PHP Version

irelevant

Hosting Environment

Irelevant as is is a HTML/CSS/GUI/whatever issue

Originally created by @a1466d44-d3dc-4c0b-90c7-315b088731d7 on GitHub (Nov 30, 2021). ### Describe the Bug Xterm secondary clipboard (select with mouse, then paste anywhere with middle mouse button) does not work on Code Blocks Normal Text works just fine ### Steps to Reproduce 0. Use Linux (Kubuntu in my case) 1. Create or open any page 2. Create or find a Code block 3. Mark text from inside the code block with Mouse 4. try to paste selected text with middle mouse button anywhere else (like a Console window for example) ### Expected Behaviour Paste selected Text as i normaly would ### Screenshots or Additional Context Issue is only Linux related ### Exact BookStack Version v21.11.1 (but basicaly everyone) ### PHP Version irelevant ### Hosting Environment Irelevant as is is a HTML/CSS/GUI/whatever issue
OVERLORD added the 🐛 Bug label 2026-02-05 04:22:26 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Nov 30, 2021):

Hi @Daywalker01,

Just tried this on my machine.
Using Fedora 35 & Firefox 94. Copying from the terminal and pasting, using the middle mouse button, into a code block worked without issue. I tested using both gnome terminal and alacritty.

There's a lot of variables that could affect the copy and paste of content along those steps (Browser, browser packaging environment, display server, desktop environment, terminal application). It's going to take a lot of time to play around with those to find the cause (And see if it's on BookStack's side), so I personally wouldn't want to spend much more effort on this unless a specific change to be made could be pointed out.

@ssddanbrown commented on GitHub (Nov 30, 2021): Hi @Daywalker01, Just tried this on my machine. Using Fedora 35 & Firefox 94. Copying from the terminal and pasting, using the middle mouse button, into a code block worked without issue. I tested using both gnome terminal and alacritty. There's a lot of variables that could affect the copy and paste of content along those steps (Browser, browser packaging environment, display server, desktop environment, terminal application). It's going to take a lot of time to play around with those to find the cause (And see if it's on BookStack's side), so I personally wouldn't want to spend much more effort on this unless a specific change to be made could be pointed out.
Author
Owner

@a1466d44-d3dc-4c0b-90c7-315b088731d7 commented on GitHub (Nov 30, 2021):

You are right...
It works on a (fresh installed) Chromium Browser, but it wont on an empty Firefox 90 (no plugins, also tried private window)
OS is Kubuntu 20.10
I am sorry for the inconvenience. I should have tested a little more.
There are no other websites presenting this issue in Firefox, therefore I assumed it had something to do with BookStack
(Unfortunately, i don't like Chromium, and prefer Firefox + uMatrix + uBlock Origin)
Any Ideas where I could look?
PS.: I guess this issue can be closed

@a1466d44-d3dc-4c0b-90c7-315b088731d7 commented on GitHub (Nov 30, 2021): You are right... It works on a (fresh installed) Chromium Browser, but it wont on an empty Firefox 90 (no plugins, also tried private window) OS is Kubuntu 20.10 I am sorry for the inconvenience. I should have tested a little more. There are no other websites presenting this issue in Firefox, therefore I assumed it had something to do with BookStack (Unfortunately, i don't like Chromium, and prefer Firefox + uMatrix + uBlock Origin) Any Ideas where I could look? PS.: I guess this issue can be closed
Author
Owner

@ssddanbrown commented on GitHub (Nov 30, 2021):

Any Ideas where I could look?

Not totally sure.
Our code blocks use codemirror. You could give one of their demos a go with pasting. Might indicate if it's a issue in all codemirror instances or just within BookStack or the version we use.

Otherwise, Could try updating Firefox since 90 is a couple of versions old.
Could also upgrade to a new OS. Kubuntu 20.10 reached end-of-life in July: https://kubuntu.org/news/kubuntu-20-10-groovy-gorilla-reaches-end-of-life/
(That might be why you're not getting FireFox updates?)

Will therefore close this as it's not an active issue for us to look into but feel free to continue to comment if needed.

@ssddanbrown commented on GitHub (Nov 30, 2021): > Any Ideas where I could look? Not totally sure. Our code blocks use codemirror. You could give [one of their demos](https://codemirror.net/demo/theme.html) a go with pasting. Might indicate if it's a issue in all codemirror instances or just within BookStack or the version we use. Otherwise, Could try updating Firefox since `90` is a couple of versions old. Could also upgrade to a new OS. Kubuntu 20.10 reached end-of-life in July: https://kubuntu.org/news/kubuntu-20-10-groovy-gorilla-reaches-end-of-life/ (That might be why you're not getting FireFox updates?) Will therefore close this as it's not an active issue for us to look into but feel free to continue to comment if needed.
Author
Owner

@a1466d44-d3dc-4c0b-90c7-315b088731d7 commented on GitHub (Nov 30, 2021):

As you just pointed out, I totally forgot that my Kubuntu installation was outdated...
After an upgrade (Kubuntu 21.04 for now) and Firefox 94.0 things still don't work as expected... :(
I even created a whole new user, to start off with a clean slate, and Firefox Profile. Still no luck...
(If you still have some Ideas left, I'd appreciate them.
If not, still thank you, for this Application :)

@a1466d44-d3dc-4c0b-90c7-315b088731d7 commented on GitHub (Nov 30, 2021): As you just pointed out, I totally forgot that my Kubuntu installation was outdated... After an upgrade (Kubuntu 21.04 for now) and Firefox 94.0 things still don't work as expected... :( I even created a whole new user, to start off with a clean slate, and Firefox Profile. Still no luck... (If you still have some Ideas left, I'd appreciate them. If not, still thank you, for this Application :)
Author
Owner

@a1466d44-d3dc-4c0b-90c7-315b088731d7 commented on GitHub (Nov 30, 2021):

not quite sure if thats a related issue?
https://github.com/Zettlr/Zettlr/issues/2321

@a1466d44-d3dc-4c0b-90c7-315b088731d7 commented on GitHub (Nov 30, 2021): not quite sure if thats a related issue? https://github.com/Zettlr/Zettlr/issues/2321
Author
Owner

@ssddanbrown commented on GitHub (Dec 2, 2021):

not quite sure if thats a related issue?

Possibly related. Might be something that acts differently between xorg and wayland. I'm on Wayland.

@ssddanbrown commented on GitHub (Dec 2, 2021): > not quite sure if thats a related issue? Possibly related. Might be something that acts differently between xorg and wayland. I'm on Wayland.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#2513