WebTextField.Text incomplete during WebButton.Pressed event

Hi everyone,

I’m having an issue where WebTextField.Text does not contain the full string entered by the user when retrieved inside a WebButton.Pressed event.

It seems the TextChanged event (which synchronizes the content to the server) is being outrun by the Button’s Pressed event. If a user types quickly and hits “Enter” or clicks the button, the last characters are missing from the Text property.

I’ve checked the documentation, and while TextChanged is supposed to handle the sync, the latency between the browser and the server is causing a race condition.

Has anyone found a way to guarantee the Text property is fully updated before processing the button action without resorting to custom JavaScript?

Thanks!

This is the asynchronous nature of the web. Xojo has a switch that will ensure events arrive in an expected order on the Session object:

Be sure that is enabled / on.