A st.tex_input bug?

So guys I am building a chat with your scientific docs application using the openai api. I tried testing it today. It seems to be working well but sometimes when I ask questions in the chatbox, the typing is from right to left instead. This is quite weird and unexpected to me. Has anyone encountered a similar error and knows how to solve this? The front end is streamlit, I am using st.text_input for the query

Do you have a sample code?