Keyboard bug

Getting into LiveCode for iOS? Ask your questions here.

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
Posts: 31
Joined: Sat Mar 12, 2016 9:15 am

Keyboard bug

Post by brotee » Sat Jul 21, 2018 8:26 pm

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?

VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5399
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN

Re: Keyboard bug

Post by jacque » Tue Jul 24, 2018 9:33 pm

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.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software |

Post Reply

Return to “iOS Deployment”