I want my cursor to move to the new text_input which is being made after I hit enter in the previous text area

Summary

So I made a conversational chatbot using list and streamlit. But when Whenever I press enter the cursor doesn’t move to the new text input neither the page moves down any idea how I can do it?

Steps to reproduce

Code snippet:

    global c
    ref = st.text_input("Enter text here",key=c, label_visibility="collapsed", placeholder="Enter text here👇")
    if (ref and ref!="stop"):
        chat = Chat(history, reflections)
        respo = chat.respond(ref)        
        st_message(respo, is_user=True)
        c = c+1
        main()

If applicable, please provide the steps we should take to reproduce the error or specified behavior.

Expected behavior:

Explain what you expect to happen when you run the code above.

Actual behavior:

Explain the undesired behavior or error you see when you run the code above.
If you’re seeing an error message, share the full contents of the error message here.

Debug info

  • Streamlit version: (get it with $ streamlit version)
  • Python version: (get it with $ python --version)
  • Using Conda? PipEnv? PyEnv? Pex?
  • OS version:
  • Browser version:

Requirements file

Using Conda? PipEnv? PyEnv? Pex? Share the contents of your requirements file here.
Not sure what a requirements file is? Check out this doc and add a requirements file to your app.

Links

  • Link to your GitHub repo:
  • Link to your deployed app:

Additional information

If needed, add any other context about the problem here.