Clipboard doesn't work in built-in text editor with Gboard keyboard
Please agree to the following
- [X] I have searched existing issues for duplicates
- [X] I agree to follow this project's Code of Conduct
Summary
Clipboard doesn't work in built-in text editor
System Setup
- Android: 14
- Cryptomator: 1.10.2
Cloud Type
Google Drive
Steps to Reproduce
- Create a text file and edit it.
- Select and copy some text.
Expected Behavior
The copied text should be in the clipboard.
Actual Behavior
Whatever was previously in the clipboard is still there. I.e. copying/cutting text simply doesn't do anything. (Well... cutting deletes the text without an ability to get it back.)
Reproducibility
Always
Relevant Log Output
No response
Anything else?
No response
Is there a difference to what I'm doing here?
https://github.com/user-attachments/assets/3da15269-2184-43f5-b963-f5a65723eaa2
So yeah, it's half my bad. I tend to use the Gboard clipboard because it's faster than holding down and pasting and shows a preview. This is the first app I've used where it seems like the system clipboard and the Gboard clipboard diverge.
Hence "half my bad" - I think it's understandable that I didn't realize what's going on but on the other hand, the cryptomator app clearly supports the clipboard to some extent. Personally, I'm fine now that I know but it of course would be nice if you could support the Gboard clipboard (might also be other keyboards) if it can be done easily.
https://github.com/user-attachments/assets/007a095d-2b32-4311-a60e-73a951aee53f
In every input field in Cryptomator, we are setting a flagNoPersonalizedLearning which prevents the keyboard from training with this data, see e.g.
https://github.com/cryptomator/android/blob/c2d3ebbe056d075860c29a4a1bfc4aed3051dd55/presentation/src/main/res/layout/fragment_text_editor.xml#L17
and also flagNoPersonalizedLearning in https://developer.android.com/reference/android/widget/TextView#attr_android:imeOptions for further information.
It looks like Gboard disables the clipboard if this flag is set. If I remove it:
https://github.com/user-attachments/assets/75b6d1b9-1ec3-4cfc-8859-d023031b808c
The only option would be to introduce an option in Cryptomator settings to disable flagNoPersonalizedLearning but I would not recommend this to users because Cryptomator is an privacy/security app and instead would recommend another keyboard.
...should we keep this open and turn it into a feature request to make the flagNoPersonalisedLearning flag configurable, or should we close it and keep it for documentation?
Personally, I see the privacy concerns regarding this as partly beyond cryptomator's responsibility. What I mean by this - cryptomator is for encrypting files on cloud drives and that's mostly it. However, I agree that this default behavior shouldn't be changed (for the reasons that you mentioned). But I think offering it as an option in the settings would be good.
(In case other people stumble across this, I would like to point out that other than using a privacy-respecting keyboard (something that I agree with - I only use Gboard for reasons I won't go into right here), one can also work around this by using "Open with..." on a file and using an app like e.g. QuickEdit+ for text files.)