Form field in repeating panel not updating value on loss of focus on touch devices

What I’m trying to do:
I have an app that is used primarily on android tablets. It uses a repeating panel to have a list of items with a text box on each row for the quantity. There is a submit button to save the form etc…
The issue arises when a user on a mobile / touch device changes a field value then immediately touches the save button without touching anywhere else on the background, then the field will not write back to the bound object. Issue cannot be replicated on a desktop browser with a mouse

What I’ve tried and what’s not working:
The only way I could kluge it to work is adding an alert to “on change”

I have tested this on android and ios
you can see it here. change a quantity field then touch the “do stuff” button

code is here

Code Sample:

# code snippet

Clone link:
share a copy of your app
https://anvil.works/build#clone:TAHXEUCV7VBQALR3=F4GHY4HYT4YDWZTRXBUDNUMM

Hi, I’m having the same issue. Is there a way to resolve this other than your workaround to add an alert on change?

Thanks!

Anvil-extras includes a wait-for-writeback decorator that might be able to help.

2 Likes

@hugetim Thank you so much! This immediately solved my issue.

1 Like

Great! Well, @stucork gets the credit for that handy utility.

By the way, welcome to the forum!