(Solved)Focus on nothing not working in preopencard

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
EddieLee
Posts: 118
Joined: Thu Oct 25, 2018 1:06 pm

(Solved)Focus on nothing not working in preopencard

Post by EddieLee » Tue Aug 25, 2020 6:50 am

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!
Last edited by EddieLee on Wed Aug 26, 2020 6:24 pm, edited 1 time in total.
Eddie :D

Thierry
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 875
Joined: Wed Nov 22, 2006 3:42 pm

Re: Focus on nothing not working in preopencard

Post by Thierry » Tue Aug 25, 2020 8:54 am

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
!
SUNNY-TDZ.COM doesn't belong to me since 2021.
To contact me, use the Private messages. Merci.
!

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9386
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Focus on nothing not working in preopencard

Post by richmond62 » Tue Aug 25, 2020 9:11 am

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.

EddieLee
Posts: 118
Joined: Thu Oct 25, 2018 1:06 pm

Re: Focus on nothing not working in preopencard

Post by EddieLee » Tue Aug 25, 2020 11:12 am

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 !
Eddie :D

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

Re: Focus on nothing not working in preopencard

Post by jacque » Tue Aug 25, 2020 5:53 pm

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

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”