Web 2.0 missing ui input

Hi team
In one of my apps I’m seeing an issue where button presses are being missed.
I do run a bit of code within the press but I wouldn’t have thought this was the issue.
I do see the attached error when the press is missed and if I push a few more times the button action even fires and all is good. I also see pop up menus with similar behavior but in this instance the ui changes but the action event does not fire. Any suggestions for best practice? Sorry for the screenshot. I’m working on an offline system.

What is “a bit of code”

What version of Xojo?
Can you create a sample project?

Not sure what could be happening from that screenshot but, without looking at the code, it looks like the solution will be moving any time-consuming code inside the WebButton.Pressed event into a WebThread.

This example can help:
Examples → Platforms → Web → ThreadProgress

At the moment, the code inside Pressed will make the request to wait until that method finishes, to send the response back to your browser. If it takes too long, it will timeout.

If you just start a WebThread instead in that event, the response will be fast enough and won’t timeout. As soon as the WebThread finishes, Xojo will send any update through the EventSource dedicated connection.

2 Likes