I've searched the forum for an info but couldn't unfortunately find a clear solution.
I'm adapting an app to Android and when using the Native InputText after pressing "Return"(Done or Whatever), keyboard disappears but the cursor still flashes in the field. I've tried "focus on a button or anything else with no result, also "send mouseUp" to any object as well. Strangely when i touch anything on the screen then the "focus" or the flashing cursor goes away.
Any Hint? Thx in Advance
Tested on real device (Note 4), Last LC 6.7.1 CE, Mac Yosemite.
PS: Lengthy explanation just for clarity purposes.
Does anyone has a working example on Android with the Native InputText with the Focus removed from the field when pressing 'Return" or when the 'keyboardDeactivated' message sent ?
I haven't looked at this for a while but try putting the focus command in a returnInField handler in the field script. If that doesn't work try setting the autoTab property of the field to true. Either of those should remove the focus from the field.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
I haven't looked at this for a while but try putting the focus command in a returnInField handler in the field script. If that doesn't work try setting the autoTab property of the field to true. Either of those should remove the focus from the field.
I've found a workaround but not very elegant though in the card script :
on inputReturnkey
focus on fld "Whatever" --------------------(TraversalOn to True Already) so i can move from the native field
set the traversalOn of field "Whatever" of card "Menu" to false ----------Once there Remove its focus again
end inputReturnkey
on inputBeginEditing ------------------Setting Back the TraversalOn true so i can focus elsewhere again
set the traversalOn of field "Whatever of card "Menu" to true
end inputBeginEditing
Still the annoying part is that the keyboard message is triggered (notification bar) but keyboard not shown...........
i don't remember having to do all this stupid maneuver on iOS !!! I am sure there should be an easy way or it is just a bug!!!!!
Still investigating but any help is really appreciated! Thx
reading your last post, It seems that you are mixing LC fields with native input fields... for example you can't set the 'traversalOn' of a native field... maybe this is where your problems lie...
@Jacque.. Sorry about my post, I think you are understanding what is happening here more than I am..
I created a Native field from which i store a string. On exiting that native field, on its on "inputReturnkey" message i "Focus on" a created invisible field in the card with its traversalOn value originally set to TRUE.
The original issue was i could never remve the focus from the native field even after trapping the inputReturnkey" message.
Focus on Nothing couldn't do anything but this is something already known or maybe an issue from either my Note 4 or LC.
I'm not working at this stage with any LC input text field.
Dixie wrote:@Jacque.. Sorry about my post, I think you are understanding what is happening here more than I am..
Nope, I was assuming LC fields, so you were right. ReturnInField wouldn't do anything in a native field. But using "focus on nothing" within the "inputReturnkey" handler seems like it should work. If it doesn't, maybe it's easer to just force a scripted click somewhere on the card:
That would simulate what happens when the user manually clicks out of the field. It does seem like there should be a way to remove the insertion point though. iOS offers the ability to disable a native field, which might do it, but that isn't available on Android.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
Thx Jacque but this is very strange, when i apply "click" or "mouseUp" by code in a handler the code works but the focus remains on the native field but when i physically touch the screen (which is similar to the code in the handler) the focus is removed !??
Are there specific conditions to make the code remove the focus or should i report for a bug ?
I gave up with the idea of using the Native Input Text on Android as for the time being managing the "focus" on it seems not to be working.
I'm using the LC fields which is ok for my app at this stage.
I will report it as a bug.
Once again many thanks Jacque & Dixie for your time, and to All our community I Wish you a Happy New Year !!