You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a TextField is bound to a string that already contains text, typing can insert new characters at the start of the string instead of at the end where the caret appears to be.
This seems to happen when the same TextField widget is reused across editing sessions or window reopenings. The visible text is correct, but the internal insertion point/selection can remain stale, so the next typed character is inserted at byte 0 instead of after the existing text.
Expected behavior
If a TextField is opened with an existing value like "hello", focusing the field and typing "x" should produce "hellox".
Actual behavior
Focusing the field and typing "x" can produce "xhello".
Screen.Recording.2026-04-10.at.9.41.03.am.mov
How to reproduce
Create a TextField bound to a string that already contains text.
Render the UI window.
Focus the field.
Type a character.
In my case this shows up reliably when the same UI/workspace is reused and the field is reopened with preloaded text.
Notes
As far as I can tell, this does not appear to be misuse of the API. It looks like the cached text input state is being reused without resetting the selection/caret position from the current bound string on focus.
A similar problem can also happen after programmatically replacing a field’s value: the visible text updates, but the next typed character can still insert at the start if the internal selection is left at 0,0.
When a
TextFieldis bound to a string that already contains text, typing can insert new characters at the start of the string instead of at the end where the caret appears to be.This seems to happen when the same
TextFieldwidget is reused across editing sessions or window reopenings. The visible text is correct, but the internal insertion point/selection can remain stale, so the next typed character is inserted at byte 0 instead of after the existing text.Expected behavior
If a
TextFieldis opened with an existing value like "hello", focusing the field and typing "x" should produce "hellox".Actual behavior
Focusing the field and typing "x" can produce "xhello".
Screen.Recording.2026-04-10.at.9.41.03.am.mov
How to reproduce
TextFieldbound to a string that already contains text.Notes
As far as I can tell, this does not appear to be misuse of the API. It looks like the cached text input state is being reused without resetting the selection/caret position from the current bound string on focus.
A similar problem can also happen after programmatically replacing a field’s value: the visible text updates, but the next typed character can still insert at the start if the internal selection is left at 0,0.