thorium-reader
thorium-reader copied to clipboard
linux: text selection and middle click paste
using the Linux version, even if Ctrl+C
is disallowed, is still possible to highlight a selection (or entire chapter with Ctrl+a
) and then paste the text elsewhere with middle click.
probably a solution is to disable highlight/selection across the epub reader (css user-select?), but this is going to break future on annotations?
thanks to report this
https://askubuntu.com/questions/167570/how-does-middle-click-paste-work
https://specifications.freedesktop.org/clipboards-spec/clipboards-latest.txt
note that thorium doesn't disable ctrl-c, but intercepts the clipboard copy event directly. that being said, x11 bypasses the standard clipboard API completely, so indeed we have to figure out an alternative interception mechanism.
"Highlighting text without clicking is enough to get it copied to the X11 buffer-space, and middle-clicking will paste out of that."
thus far we decided against CSS user-select:none, as this prevents legitimate text selection for bookmarking, annotations, and probably some accessibility support too. we used a different technique on MacOS to prevent ctrl-a drag+drop, so on Linux we have to find a solution for implicit x11 buffer middle-click paste that doesn't compromise other essential features.
This is a "no fix". There is simply no way to prevent X11 from copying text into its buffer when selecting and pasting when middle clicking (unless we disable text selection altogether, which is a big no-no with respect to accessibility, and other features that depend on text being selectable).