Fix X11 accidental middle mouse paste
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
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.
I'm experiencing the same thing on the Linux app.
Is there anyone currently assigned to this feature? I am eager to contribute.
Hi , I'd like to work on this issue
Hey @JimmFly can u assign this issue to me
I think these two issues are duplicates: https://github.com/toeverything/AFFiNE/issues/7874 & https://github.com/toeverything/AFFiNE/issues/8438
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?
I need more details to resolve the issue. Could you provide additional reproduction steps so I can understand it better?
can you please provide more details to resolve the issue. Could you provide additional reproduction steps so I can understand it better?
@mrcoder011 @blackholeofuniverse
- Install the linux app on any linux distribution
- Create a new edgeless document
- Use your middle click button to move around.
- 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.