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 3305

Summary: [Patch] Fixed TextInput status when the keyboard was dismissed with the dismiss key on the iPad
Product: SDL Reporter: Diego <diegoacevedo91>
Component: videoAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: HG 2.1   
Hardware: iPhone/iPod touch   
OS: iOS (All)   
Attachments: dismiss keyboard patch
dismiss keyboard patch fix
dismiss keyboard and macro fix

Description Diego 2016-04-05 15:27:40 UTC
Created attachment 2407 [details]
dismiss keyboard patch

The keyboard on iPads has a dismiss button that hides the keyboard. When the keyboard was hidden using that button, instead of the return key, SDL was still reporting IsTextInputActive as true. This patch adds an extra SDL_StopTextInput when iOS reports the keyboard will hide.
Comment 1 Sam Lantinga 2016-10-01 19:46:54 UTC
Fixed, thanks!
https://hg.libsdl.org/SDL/rev/ff5f3b3e6940
Comment 2 Diego 2016-12-01 19:54:01 UTC
Created attachment 2642 [details]
dismiss keyboard patch fix

I was previously unaware that rotating the device to a different orientation when the keyboard is shown causes a keyboardWillHide followed by a keyboardWillShow notification. The previous patch would then mistakenly StopTextInput when rotating. This patch fixes that by checking if the device is rotating before stopping text input.
Comment 3 Diego 2016-12-01 19:55:15 UTC
Reopening
Comment 4 Diego 2016-12-01 22:06:09 UTC
Created attachment 2643 [details]
dismiss keyboard and macro fix

This update corrects and explains the deprecated macro check.
Comment 5 Sam Lantinga 2016-12-02 10:22:00 UTC
Good catch, thanks!