-
Notifications
You must be signed in to change notification settings - Fork 4.2k
number_input not accepting keyboard input correctly #12349
Description
Checklist
- I have searched the existing issues for similar issues.
- I added a very descriptive title to this issue.
- I have provided sufficient information below to help reproduce this issue.
Summary
In version 1.49.0, using the keyboard to enter a value in an st.number_input box only alters the first number (e.g. typing 123 just gives 1.0). The backspace button also does not work. This does not happen in 1.48.1. The +/- incremental buttons function correctly. Does not depend on whether format or key is specified or not.
Reproducible Code Example
import streamlit as st
st.number_input("Anything")Steps To Reproduce
Run the above code in 1.49.0. Try and type a value in the input box using the keyboard. Try again in 1.48.1 and compare the behaviour.
Expected Behavior
I should be able to type any numeric value in full in the input box and be able to delete using the backspace key, also to select the input by left-click-drag.
Current Behavior
Entering a value using the keyboard is impossible as only the first number typed is accepted : instantly the input stops. Using the backspace key does nothing. This makes it impossible to type in a specific value as only the increment +/- buttons are properly functional. No error messages are reported.
Is this a regression?
- Yes, this used to work in a previous version.
Debug info
- Streamlit version: 1.49.0
- Python version: N/A
- Operating System: N/A
- Browser: Reproduced buggy and functional behaviour on Chrome (Windows and Android).
Additional Information
No response