expected behavior: middle mouse button should paste EXCEPT after scrolling. problem behavior: middle mouse button pastes even after scrolling up/down. This happens in at least Chrome, Kate, and Konsole. Interestingly, it seems to work correctly immediately after a new logon, then the behavior starts shortly after. It happens in X and Wayland.
also note that the paste happens when the middle-button is released - so for instance, I press and hold the middle mouse button to scroll through konsole history - when I release the middle mouse button the buffer is pasted, and it brings me back down to the shell prompt.
On X11, all input goes through libinput and the X server, so KDE code is not involved. On Wayland it goes through libinput and KWin. While it's possible that both the X server and KWin have the exact same bug, it's more likely that the bug is in the source of commonality: libinput. So I would recommend that you report this to the libinput folks at https://gitlab.freedesktop.org/libinput/libinput/-/issues/. Thanks!
Thank you - libinput guys had a bug with same symptoms, but much better problem description: https://gitlab.freedesktop.org/libinput/libinput/-/issues/964 This lead to a kernel firmware bug, which should be making it's way to kde neon eventually: https://lore.kernel.org/all/20231223191401.70727-1-me@khvoinitsky.org/T/
Fabulous!