TextEditor doesn't handle return key properly on iOS

On macOS or Windows when a user enters return key it fires TextEditor::onReturnKey
On iOS a return key is ultimately converted to a space and inserted and onReturnKey is not fired.

What happens is that iOS sends an insert message with a \n character.
This is recieved here

And then gets converted to spaces here

Typically you would want to check in the Object-C part if the text being inserted is a single \n and instead call something that will fire onReturnKey

See this SO answer on that topic:

1 Like

A solution for this would fix some ugly workarounds for me too :slight_smile:

1 Like

Bump - this is obviously a JUCE bug

1 Like

Any chance we could at least get this confirmed as a bug? Is there anything else I can do to help?
It currently requires that we have different implementations of our UI in this area on iOS and desktop.

I’ve got a fix on the way.

1 Like

Fantastic!

Any ETA on this? JUCE 7.0.3 doesn’t seem to have that fixed

1 Like

It’s currently in review. I’m not sure when it will be made public.

3 Likes

:+1:

I hope it’s coming soon because this is holding back our release for a few weeks now - thanks!

1 Like

This issue should be resolved in the following commit:

3 Likes

This fixed the issue. Thank you!