AFFiNE icon indicating copy to clipboard operation
AFFiNE copied to clipboard

Fix X11 accidental middle mouse paste​

Open johannesCmayer opened this issue 1 year ago • 8 comments

What happened?

On Linux when you use middle mouse to move around, as soon as you release the middle mouse button a new textbox is created with the primary clipboard contents.

Expected behavior: Either the middle mouse does not paste, or at minimum, it does not paste when first having moved the mouse to pan around.

Distribution version

Web (app.affine.pro)

What browsers are you seeing the problem on if you're using web version?

Chrome

Are you self-hosting?

  • [ ] Yes

Relevant log output

No response

Anything else?

No response

johannesCmayer avatar May 22 '24 14:05 johannesCmayer

Issue Status: 💡 Open

💡 Open

We want to implement the fix or feature in the near future. We can’t promise it will appear in the next public release, but it’s on our short list.

This is an automatic reply by the bot.

affine-issue-bot[bot] avatar May 22 '24 14:05 affine-issue-bot[bot]

I'm experiencing the same thing on the Linux app.

windux32 avatar Jul 04 '24 23:07 windux32

Is there anyone currently assigned to this feature? I am eager to contribute.

Abhijeettri141 avatar Aug 14 '24 04:08 Abhijeettri141

Hi , I'd like to work on this issue

Swetabh333 avatar Sep 06 '24 16:09 Swetabh333

Hey @JimmFly can u assign this issue to me

BadriVishalPadhy avatar Oct 11 '24 01:10 BadriVishalPadhy

I think these two issues are duplicates: https://github.com/toeverything/AFFiNE/issues/7874 & https://github.com/toeverything/AFFiNE/issues/8438

toofar avatar Nov 22 '24 23:11 toofar

Also, does anyone have any ideas for a fix here? I don't think we can tell on the paste event whether it is from the middle mouse or ctrl+c, or which x11 clipboard it's from. Could we send an event to the clipboard controller on dragEnd from a pointerup event telling it not to paste for a short interval?

toofar avatar Nov 23 '24 01:11 toofar

I need more details to resolve the issue. Could you provide additional reproduction steps so I can understand it better?

blackholeofuniverse avatar Dec 07 '24 11:12 blackholeofuniverse

can you please provide more details to resolve the issue. Could you provide additional reproduction steps so I can understand it better?

mrcoder011 avatar Apr 03 '25 13:04 mrcoder011

@mrcoder011 @blackholeofuniverse

  1. Install the linux app on any linux distribution
  2. Create a new edgeless document
  3. Use your middle click button to move around.
  4. The moment you stop holding middle click, a new note will appear in the edgeless document. Two scenarii can occur here:
    • If your primary clipboard was filled with something, the content of the primary clipboard will appear inside the created note.
    • If your primary clipboard was empty, the created note will be empty.

This behavior work on both X11/XWayland and Wayland. It is perfectly consistent.

This deters people from using middle click as a way to pan in edgeless and forces Linux users to use the Hand Tool to pan.

Zhaith-Izaliel avatar Apr 26 '25 13:04 Zhaith-Izaliel