LibreOffice haphazardly pastes clipboard content into document

I am using LibreOffice Writer in Kubuntu 22.04.

Since a while, I constantly keep finding clipboard contents in the document I am editing. It looks to me like this content is inserted at the cursor location without me pasting it. This is very weird. I often only discover this when later re-reading the text. It also is text I copied in other applications.

I know this is now a very precise description of the problem, but I hope someone else has seen this and found a solution. Like this, Writer basically is unusable because it constantly messes up my document without me noticing.

BTW, I have been using LibreOffice for many years and never experienced this problem.

Version: / LibreOffice Community
Build ID: 30(Build:2)
CPU threads: 4; OS: Linux 5.15; UI render: default; VCL: kf5 (cairo+xcb)
Locale: en-US (en_US.UTF-8); UI: en-US
Ubuntu package version: 1:7.3.7-0ubuntu0.22.04.3
Calc: threaded

Just to double-check: are you aware that in Linux, middle mouse button pastes?

Yes, I am. Middle button clicks are not the issue. Possibly related, the UI (the text area) often freezes for long periods. The rest of the UI still works. For example, the menu is active and I can close (and save) the document.

In case you are using Ubuntu’s snap version of LibreOffice, try if the packaged version instead solves the problem(s).

I restarted Writer in Safe Mode, and re-installed the Zotero Plugin, and for the moment the behavior seems normal. Maybe something was corrupted in the document or with the plug-in. I will report back whether the problem is solved.