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 - iOS: don't hide keyboard on RETURN (patch included)
Summary: iOS: don't hide keyboard on RETURN (patch included)
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: events (show other bugs)
Version: 2.0.7
Hardware: iPhone/iPod touch iOS (All)
: P2 enhancement
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-17 11:56 UTC by Dominik Reichardt
Modified: 2017-12-19 18:57 UTC (History)
0 users

See Also:


Attachments
patch (1.48 KB, patch)
2017-12-17 11:56 UTC, Dominik Reichardt
Details | Diff
Patch to unify Android and iOS hint (1.95 KB, patch)
2017-12-17 13:15 UTC, Dominik Reichardt
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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!