Page 1 of 1

(Solved)Focus on nothing not working in preopencard

Posted: Tue Aug 25, 2020 6:50 am
by EddieLee
Hi all,

I have a fld “search” in cd “homepage” and whenever I start the app, the focus is always on fld “search”. I tried putting focus on nothing at the start and end of the preopencard handler but it still doesn’t work. Any idea why?

Thanks!

Re: Focus on nothing not working in preopencard

Posted: Tue Aug 25, 2020 8:54 am
by Thierry
EddieLee wrote:
Tue Aug 25, 2020 6:50 am
I tried putting focus on nothing at the start and end of the preopencard handler
but it still doesn’t work. Any idea why?
Hi Eddie,

Did you tried to move it in the opencard handler?

HTH,

Thierry

Re: Focus on nothing not working in preopencard

Posted: Tue Aug 25, 2020 9:11 am
by richmond62
If you put 'focus on nothing' in the preOpenCard handler it probably doesn't understand it,
or at least that command has "come and gone" before the card opens, at which point the default focus is put in place.

Re: Focus on nothing not working in preopencard

Posted: Tue Aug 25, 2020 11:12 am
by EddieLee
Thierry wrote:
Tue Aug 25, 2020 8:54 am
Hi Eddie,

Did you tried to move it in the opencard handler?

HTH,

Thierry
Hi!

I tried putting the focus on nothing codes at the start and end of my opencard handler but whenever the app starts, the keyboard still shows up like its focused on some fld.

Thanks !

Re: Focus on nothing not working in preopencard

Posted: Tue Aug 25, 2020 5:53 pm
by jacque
This is a long-standing issue. There are workarounds:
https://quality.livecode.com/show_bug.cgi?id=22790

Mainly you need to turn off traversalOn in preopencard and send a message to turn it back on after the card loads. There's a link to a discussion at the bottom of the bug report.

More discussion:
https://www.mail-archive.com/use-liveco ... 07052.html