I have a login card where i can enter login and password
i'm in native input passwod field, keyboard is up, i press the login button then the app changes card, the new card has mobilepick in opencard, and if i choose one option from mobilpick, the keyboard comes up again sometimes, and it's impossible to hide.
i tried focus on nothing, no luck. but i can't even close keyboard with keyboard close button on screen
Any solution for this?
Keyboard bug
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 7228
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Keyboard bug
LC will automatically select the first editable field on a card when it opens. It sounds like that may be what you are seeing (if not, then skip the rest of this post.) On mobile, of course the keyboard comes up. You should be able to remove it by clicking outside the field but it is annoying anyway.
First off, issue "focus on nothing" before you change cards. That will remove the keyboard before any navigation happens. Also, in a closeCard handler on the first card, set the traversalOn to false for the first editable field on the destination card. TraversalOn controls the keyboard activation.
In the destination card, add a preOpenCard handler (or put one somewhere in the message hierarchy) that includes this:
on preOpenCard
send "restoreField" to me in 100 milliseconds
end preOpenCard
on restoreField
set the traversalOn of fld <whatever> to true
end restoreField
You have to send the command in a period of time, it won't work if you set the traversalOn directly in a preOpen- or openCard handler. And yes, this is a pain.
First off, issue "focus on nothing" before you change cards. That will remove the keyboard before any navigation happens. Also, in a closeCard handler on the first card, set the traversalOn to false for the first editable field on the destination card. TraversalOn controls the keyboard activation.
In the destination card, add a preOpenCard handler (or put one somewhere in the message hierarchy) that includes this:
on preOpenCard
send "restoreField" to me in 100 milliseconds
end preOpenCard
on restoreField
set the traversalOn of fld <whatever> to true
end restoreField
You have to send the command in a period of time, it won't work if you set the traversalOn directly in a preOpen- or openCard handler. And yes, this is a pain.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com