TextBox Cursor Position when Text Changed Behavior has Changed

Previously, changing the Text property of a TextBox while the user was focused in it would move the cursor to the end of the text.

As of a recent update, upon changing the Text, the cursor position remains in the same relative position.

For example, consider you had a script where pressing Tab auto-completed text based on suggestions. Previously, pressing Tab to accept a suggestion would move your cursor to the end. Now, pressing Tab keeps your cursor in the same place, so you must manually move your cursor to the end.

I would generally consider this desired behavior now that we have the CursorPosition property, however, this change has broken the auto-complete feature in existing systems of mine, notably Cmdr. I think that it would be better to preserve the old behavior in this case for compatibility reasons.

I’ve attached a place file demonstrating a case where this behavior change makes a difference:

TextBoxBehaviorChangeRepro.rbxl (20.8 KB)

3 Likes

Hi @evaera - thank you for the detailed bug report! We recently (7/15) deployed improvements to the text positioning pipeline. It’s possible that this may have inadvertently caused the cursor positioning issue described here. I created a ticket to investigate this.

6 Likes

Hi, not sure if I should reply here again but I am still having this issue with my script (I can’t open a new bug report I think due to how long I spent on the dev forums)

I’m having a similar issue when you press tab to auto-complete the text it keeps the cursor in the same position.

1 Like

Bumping this.

Has this been fixed?