Cannot select TextInput component text

  1. My goal:

Allow users to edit pre-filled text in a TextInput field, including clicking in the middle of the text to place the cursor or selecting the full pre-filled text to delete it n one keystroke.

  1. Issue:

Even after prepopulating the field using form.setData(), the user can’t click inside the input field to place the cursor in the middle of the text. The cursor only lands at the start or end, and movement is only possible with arrow keys.

  1. Steps I've taken to troubleshoot:

    Used TextInput, not TextArea :white_check_mark:

    Set Form data key correctly (e.g., kbo_number) :white_check_mark:

    Left Default value empty :white_check_mark: (and using form.setData() )

    Used form1.setData({...}) to populate form :white_check_mark:

    Applied global CSS:

    input, textarea {
    user-select: text !important;
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    }

    Tried JS focus + setSelectionRange() manually :white_check_mark:

    Confirmed it also happens with typed (not just prefilled) default input :white_check_mark:

    Checked component tree for overlap/layers — none found :white_check_mark:

    Confirmed form1.data updates as expected :white_check_mark:

  2. Additional info:

    Hosting: Retool Cloud

    Browser: Firefox (latest)

    Component name: textInput3

I just double checked my text input fields and I can set the cursor in the middle of the text. I can also double-click to select whole words or select the whole text and delete.

I checked with both Chrome and Firefox.

I don't use "form1.setData()", I'm not sure what that is. I just set the "Default value" for the textInput and choose the currentRow or selectedRow data that It need.

I don't have any special CSS applied either.

1 Like

Okay, thanks for checking it out

Welcome to the community, @Jinfra! Thanks for reaching out. Like @davblo, I'm unable to replicate this behavior in a relatively simple recreation of what you've described. If you want to share a JSON export of your app, though, I can take a closer look. :+1:

Thank you Darren, I've just send you an export via private message