Linux Middle-click paste triggers accidentally

Steps to reproduce

Setup:

  1. Select some text somewhere to fill the so-called “primary selection” in X11 (I haven’t tested with Wayland)
  2. Make sure it actually works when you intentionally middle-click somewhere in a plain text part of an Obisidian buffer
  3. Now place the text cursor somewhere to refer to after the following steps

Problem A (middle-clicking a link):

  1. Perform the above setup
  2. Middle click a link in a Live Preview mode
  3. Observe that it opens the link in a new tab
  4. Switch back to the original tab and observe that it also inserted the text from Setup step 1 at the editor position from Setup step 3

Problem B (middle-clicking a tab):

  1. Perform the above setup
  2. Open a second tab from the current tab while in Live Preview mode, such as by ctrl-clicking a link (to avoid the middle-click problem)
  3. Middle click the new tab in the tab bar to close it and return to the original tab
  4. Observe that it also inserted the text from Setup step 1 at the editor position from Setup step 3

Expected result

It should never insert text when middle-clicking on an interactive element like a link in Live Preview mode, or on the tab bar. Quoting myself from a previous incarnation of this bug report:

Actual result

As described in the reproduction steps: middle-click paste triggers when it shouldn’t.

Environment

  • Operating system: Linux (NixOS — with X11 windowing, as opposed to Wayland)
  • Debug info:
SYSTEM INFO:
	Obsidian version: v1.1.16
	Installer version: v1.1.16
	Operating system: #1-NixOS SMP PREEMPT_DYNAMIC Fri Mar  3 10:56:18 UTC 2023 6.2.2
	Login status: not logged in
	Insider build toggle: off
	Live preview: on
	Legacy editor: off
	Base theme: dark
	Community theme: none
	Snippets enabled: 14
	Restricted mode: off
	Plugins installed: 19
	Plugins enabled: 17
		1: Recent Files v1.3.5
		2: File Explorer Note Count v1.2.0
		3: Icon Folder v1.7.0
		4: Style Settings v1.0.3
		5: Supercharged Links v0.9.3
		6: Hider v1.2.4
		7: Quick Explorer v0.2.8
		8: Contextual Typography v2.2.4
		9: Emoji Shortcodes v2.2.0
		10: Dataview v0.5.55
		11: Obsidian Git v2.17.4
		12: Auto Link Title v1.4.1
		13: Omnisearch v1.12.3
		14: HTML Reader v1.0.7
		15: Force note view mode v1.1.1
		16: Sync Graph Settings v1.0.1
		17: Image Toolkit v1.3.1

RECOMMENDATIONS:
	Custom theme and snippets: for cosmetic issues, please first try updating your theme and disabling your snippets. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community theme and snippets.
	Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.

Additional information

This is re-post of [1.1.9] [linux] [appImage] mouse middle-click seems still got accident paste which was reported fixed in 1.1.13. The symptoms are identical between 1.1.9 and 1.1.16 — there has been no observable change. The reproductions from that bug are still reproducible for me in 1.1.16, but I’ve reworded them above to hopefully make them clearer.

I will say, just now I tried to reproduce this in a sandbox vault, and unlike my main vault it doesn’t happen every time, but instead somewhat randomly. But it’s still reproducible with repetition. I wonder if this suggests some kind of race condition.

1 Like

Can you kindly post a screen recording of this happening in the sandbox vault. Using appimage or snap.

repro

Your Discourse instance doesn’t allow video upload, but hopefully this GIF is clear enough. I was middle-clicking the link and the tab. This is with Obsidian-1.1.16.AppImage.

thanks

If anybody still has this issue, please specify your distro and if you are running snap or appimage (we don’t take flatpak/appimage), and if Obsidian is running under X11, Xwayland, or Wayland.

I am using .deb paket
I am not using middle-click. But maybe the root cause is the same for my bug Clipboard does not work properly on linux - #4 by sketch

Don’t know if Obsidian is running under X11, Xwayland, or Wayland. How can I check this?

If you are not using the middle click, you have a different problem.

Have the same issue on Ubuntu 20.04, X11 via i3wm, 1.1.16 appimage

I have this issue - it occurs for middle clicks anywhere (on backlinks, on tabs to close them, etc).

Setup details:

  • v1.1.16 (flatpak)
  • Ubuntu 22.10
  • Gnome
  • X11

I’m having this issue – middle-clicking a link pastes from the primary selection as well as opening the link – using NixOS 23.05 and X11, with Obsidian 1.1.16. I’m not using a snap/appimage.

I don’t see a paste happening if I middle-click a tab to close it, though. Might that be related to the theme in use? (I’m using Minimal.)

will be fixed 1.3.2

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.