We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4004

Summary: iOS: don't hide keyboard on RETURN (patch included)
Product: SDL Reporter: Dominik Reichardt <sdl-bugzilla>
Component: eventsAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: enhancement    
Priority: P2    
Version: 2.0.7   
Hardware: iPhone/iPod touch   
OS: iOS (All)   
Attachments: patch
Patch to unify Android and iOS hint

Description Dominik Reichardt 2017-12-17 11:56:11 UTC
Created attachment 3115 [details]
patch

As discussed in 2012 the iOS onscreen keyboard hides when you hit RETURN (see https://discourse.libsdl.org/t/on-screen-keyboard-change/19216).
IMO this is a bad idea to not be able to influence this behavior and just recently this was fixed for Android by adding the hint SDL_HINT_ANDROID_RETURN_HIDES_IME in changeset 11768	0f2fb9ec6ad6.

I've included a little patch for this but you probably want to change the HINT name.

Perhaps it might be good to make this a shared hint for both Android and iOS but that would mean thinking about the correct default behavior.
Comment 1 Dominik Reichardt 2017-12-17 13:15:57 UTC
Created attachment 3116 [details]
Patch to unify Android and iOS hint

Added a patch to make this one hint for both Android and SDL "SDL_HINT_MOBILE_RETURN_HIDES_IME"
Comment 2 Sam Lantinga 2017-12-19 18:57:53 UTC
I renamed the hint so this can apply on other platforms as well.
https://hg.libsdl.org/SDL/rev/98ea6e4c0d68

Thanks!