How to dismiss keyboard on mobile

Stephen Barncard stephen at barncard.com
Thu May 10 13:01:06 EDT 2018


I've been struggling with this dilemma for years. thanks

sqb

--
Stephen Barncard - Sebastopol Ca. USA -
mixstream.org

On Thu, May 10, 2018 at 8:29 AM, Bob Sneidar via use-livecode <
use-livecode at lists.runrev.com> wrote:

> It's not something you would put in a field. Focus on nothing is something
> you send to lose focus on any object that currently has the focuw.
>
> For instance, you have a field which calls a validation function upon
> closeField. You have a button that saves the information in the field
> somewhere. At least on MacOS, clicking the button does NOT cause the field
> to lose focus, because on MacOS a button cannot HAVE the focus. Hence your
> validation script will never trigger, and you might save bad data.
>
> So in the mouseUp handler of the button, the first line could be focus on
> nothing. This will trigger the closeField message of the field and execute
> your validation script.
>
> Bob S
>
>
> > On May 10, 2018, at 07:28 , Sannyasin Brahmanathaswami via use-livecode <
> use-livecode at lists.runrev.com> wrote:
> >
> > on returnInField
> >   focus on nothing
> > end returninfield
> >
> > # when I put that into field itself: does nothing:
> > # on android I get a carriage return in the field on hitting returnkey
> >
> > maybe it has to do with what Jacqueline said "
> >
> > "These are just messages that the engine sends when the focus changes,
> > they don't control the field themselves. As mentioned, "focus on
> > nothing" is the command that does the actual work."
> >
> > But I would rather they don't have to click another control, other than
> the return key while inside the field itself
> >
> > BR
> >
> >
> >
> >    That is what I do whenever I need a closeField or exitField to
> trigger on a currently entered field before running off and doing things.
> focus on nothing is what you want.
> >
> >    Bob S
> >
> >
> >
> > _______________________________________________
> > use-livecode mailing list
> > use-livecode at lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list