I’m having some strange and inconsistent behaviour with st.number_input. Usually I can type a value freely and the GUI behaves, well, exactly as you would expect it to : type a number, and that’s what shows up in the input box. But sometimes I find I cannot type entries at all and have to use the +/- incremental buttons. Extensive Google searching and AI inquiries have not helped; it isn’t an issue of setting a key, putting the button inside a form, using session_state, or anything like that. The same code runs fine in one repository but not in another, even though the only difference is the requirements.txt file adding some (fairly standard) modules. For example, here’s a functioning version of the code :
Click on any of the radio buttons and you should be able to enter values in the input boxes as normal. Next, here’s exactly the same code in another repository :
https://uitestingagain.streamlit.app/
If you try and enter values in this version, you should find that only the first number updates - for example, try typing “123” and you’ll just get 1.0. The backspace button also doesn’t work.
I am absolutely baffled by this one… other apps in the same repository work fine !
The above examples are much simpler than the code I’m actually working on, but the behaviour in the second case is identical. If there were any other settings to Streamlit I changed, I don’t remember what that might be. The behaviour is the same in Chrome on Windows and Android. I’ve not tried to reproduce this behaviour offline yet.