I’m working in Perspective, Gateway 8.0.16.
I have a pretty basic setup where a menu item is clicked, and kicks off 2 events: 1) An Embedded View loads a new view, and 2) a Text Field is given focus.
The problem I’m having is that the Text Field is given focus properly half the time, and the other half, it is given focus (based on console messaging on the onFocus event and the outline around the component) but the cursor won’t be in the component. I can tell that focus wasn’t lost (because of console messaging on the onBlur event, and the outline on the component) but the cursor hasn’t moved to the Text Field.
Any thoughts on what could be stealing my cursor, or how to get it back while the Text Field has focus? Best guess is it’s a timing issue with the view loading, but I have put the focus call as late in the sequence as I can.
I’m using a message handler on the Text Field with the following code to give it focus:
self.focus() system.perspective.print('focus given by message handler')