If we update an input value twice in one frame, we get cursor jumping. This is because of rAF batching the two updates that happened in one frame. In reality, if we get a "synchronous" event, then it should be handled synchronously.
... the joys of following the footsteps of others.
To fix in web, we need to progress the VirtualDom from within the handler. Specifically for inputs/textareas.
To fix in desktop, we need to explicitly segment the two updates across frames, or nullify the first update.
For now, the problem is fixed enough in both platforms that it only appears during key spam.
Reminiscent of:
https://github.com/Andarist/react-textarea-autosize/pull/100
If we update an input value twice in one frame, we get cursor jumping. This is because of rAF batching the two updates that happened in one frame. In reality, if we get a "synchronous" event, then it should be handled synchronously.
... the joys of following the footsteps of others.
To fix in web, we need to progress the VirtualDom from within the handler. Specifically for inputs/textareas.
To fix in desktop, we need to explicitly segment the two updates across frames, or nullify the first update.
For now, the problem is fixed enough in both platforms that it only appears during key spam.