Hi…
I’m using native.newTextField to create a text editing box.
I am successfully displaying the box, and pre-filling it with my data, editing, and getting the result. I.e., normal operations are fine.
The problem I’m encountering is that there seems to be no way to implement any kind of “cancel” or “abandon my edit attempt”.
If the user taps on my ‘cancel’ button, the cancel button handler is *not* invoked … but they’re out of the editing exactly as if they’d hit <enter>.
(The handler starts with: print ("cancel: " … event.phase), and I’m not seeing *any* activity for it in this case)
If, instead, the user taps anywhere outside the text box,
poof…it’s exactly as if they’d hit <enter>
(In the handler for the newTextField I start with “print ('edit: ', event.phase)”, and I am *not* seeing any event at that point other than ‘ended’.)
I.e., I can’t differentiate between <enter> and <tapped outside the box>,
which implies there’s no way to implement a ‘cancel editing’.
Perhaps the ‘ended’ phase event has some field I’m overlooking (e.g., ended_normally, or ended_by_tapping_outside)?
My goal: the user has started to enter an ID number into my app. If he/she changes their mind, I want them to be able to cancel out of it.
(The obvious workaround, having the user edit the input to be, say, ‘cancel’, is onerous 
Hmmm…perhaps I can obtain and check the x/y of where the tap occurred?
thanks,
Stan
