Pre-requirements: We need a field with a server-side value change handler that takes some time to execute (slow network or artificial sleep when testing) and at the end sets the field value to a pre-set value.
Select the field, type in 1 and press enter -> value should be "fromserver".
Type 1 at the end of the field and press enter. Then quickly type 2 at the end of the field while the thread is sleeping. Value should briefly be "fromserver12" and once the round-trip completes it should be reset to "fromserver".
Now type 1 at the end of the field (value should be "fromserver1") and press enter -> nothing happens
Description of the bug
Pre-requirements: We need a field with a server-side value change handler that takes some time to execute (slow network or artificial sleep when testing) and at the end sets the field value to a pre-set value.
Steps to reproduce the issue:
Issue was found while fixing https://github.com/vaadin/flow/issues/20365 via https://github.com/vaadin/flow/pull/20431
Expected behavior
After pressing enter in step three above, the value "fromserver1" should be sent to the server but it is not.
Minimal reproducible example
Can be quite easily demonstrated with test code here https://github.com/vaadin/flow/pull/20431/files#diff-9c44f8ed3265aa1d33149204e10dacbcd207f8943114e161470c64f7509595d7
But note this happens on current main and on the above PR branch so the issue is not introduced by that PR.
Versions