keyboardDeactivated oddity...
Posted: Sun Jan 06, 2013 9:24 am
Greetings:
I have an iPad screen which has text entry fields in the lower half of the screen.
I found a forum post which suggested using on the 'on keyboardActivated' handler to move the text areas to the top of the screen when the keyboard was present in the lower half.
This works quite nicely, except...
It's possible to tap the screen between the text entry fields, and this seems to fire the 'on keyboardDeactivated' handler. My code moves my text fields back to the lower half of the screen ... *BUT* the keyboard remains.
When I tap the bottom right key to remove the keyboard, the 'on keyboardDeactivated' handler fires a second time.
For me, this is a bit messy, because I have other fields in the top half which I fade out and move off-screen before moving the other text fields to the top. And then I move the top fields back and fade them in once the other fields have been moved to the bottom. So, when the keyboardDeactivated handler fires the second time, my top fields fade out and in.
I'm guessing there's no way to know the keyboard is on-screen, as opposed to activated?
TIA
--paul
I have an iPad screen which has text entry fields in the lower half of the screen.
I found a forum post which suggested using on the 'on keyboardActivated' handler to move the text areas to the top of the screen when the keyboard was present in the lower half.
This works quite nicely, except...
It's possible to tap the screen between the text entry fields, and this seems to fire the 'on keyboardDeactivated' handler. My code moves my text fields back to the lower half of the screen ... *BUT* the keyboard remains.
When I tap the bottom right key to remove the keyboard, the 'on keyboardDeactivated' handler fires a second time.
For me, this is a bit messy, because I have other fields in the top half which I fade out and move off-screen before moving the other text fields to the top. And then I move the top fields back and fade them in once the other fields have been moved to the bottom. So, when the keyboardDeactivated handler fires the second time, my top fields fade out and in.
I'm guessing there's no way to know the keyboard is on-screen, as opposed to activated?
TIA
--paul