Mobile Module Not Clearing text box

I’ve been having a problem with getting an input from a user in a text box and then clearing the it with .text = “”. I get the input just fine but can not clear the box. This works when running the project normally but does not when running it through the mobile module.

I’ve tried this in the keyPressed and keyReleased events for the text box:

def clearInput(obj = event.source):
	obj.text = ""

if event.keyCode == event.VK_ENTER or event.keyCode == 13 :
	event.source.parent.parent.getComponent('Table').setValue(event.source.parent.parent.StepIndex,"Scanned Value",event.source.text)
	event.source.parent.parent.StepIndex += 1

I’ve also tried it without the invoke later part and just setting it to “”. No difference. Any ideas?

I think the problem here is as simple as the fact that the mobile popup keyboard doesn’t have an “enter” key. So you’re never getting that key press event, because the keyboard doesn’t even have that key.

We already have a ticket in the system to get this fixed, should be in 7.7.4

The code in the text box works all except the part that sets it’s text property. I’m not using the mobile keyboard but the device’s. The device is a mobile computer/bar code scanner and everything works fine if I use the bar code reader for input just not the keyboard.

Oh, I see. So, the clearInput function runs, but it doesn’t work? Have you verified that it’s running via a printout or something? The client output is hard to find with mobile, maybe write to a tag or something else to verify?

I put a message box in the clearInput function and that pops up. I don’t think that function is even necessary as it doesn’t work with it or without. All the other script is working fine.

Was there any resolution for this?

I am seeing the same behavior in 7.9.2

If I show a dialog before attempting to clear the text, the text will clear after the dialog is dismissed… But the text does not clear if we skip the dialog.