Samsung keyboard doesn't work correctly with TextEditor

When selecting the Samsung keyboard as default keyboard on recent Samsung phones and tablets, trying to enter texts in a JUCE TextEditor will fail. It fails in different ways:
Although backspace usually works, tapping on a character does not show up until you press the Done button. Sometimes, pressing a button on the keyboard makes it press the button left to the button you are pressing. Furthermore, when using voice commands, only the first letter of the word that is spoken is entered in the TextEditor. I don’t really care about the last one, but the others make it unusable on Samsung devices.
When switching to the Google GBoard however, no such problems exist. When the Samsung keyboard goes in a mode that it doesn’t suggest text, it also works ok, so perhaps changing outAttrs.inputType = InputType.TYPE_NULL;
in ComponentPeerView.java
to InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS
might work.

EDIT: I did the change to ComponentPeerView.java, copied the file into my project and changed the cpp file to not take the bytecode and now it works on my S9. On the Tab S3, it didn’t work and I had to set it to
InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS | InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD

3 Likes

This should be integrated into master IMHO since the current support for smart soft keyboards is pretty much broken

This “fix” seems to have a drawback… According to some forums, it works only with latin keyboards.

Anyone overall JUCE has this issue for a while now.
another one of those feedbacks that got lost :slight_smile:

1 Like

That’s a real shame :frowning:

Any updates on this issue? We’ve just had a report from a user on a Samsung A40, saying they are unable to type into a text field which is a JUCE TextEditor.

@ttg did you find a workaround?

Did you try something similar to my patching of adding the not use auto-correct flag?
It might help. if it does, would be nice to share you user’s insights here.

1 Like

Unfortunately that patch does not fix the issue we’re seeing on Samsung phones.

However, I still think it should be merged into JUCE as autocorrect should be off by default IMO.

1 Like

Just to confirm, the issue is with the default Samsung keyboard. Installing Gboard from Google Play and using that as the default keyboard fixes the issue.