-
Notifications
You must be signed in to change notification settings - Fork 413
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Controlled input loses cursor with React 18 when input type is :email or :number #609
Comments
I originally implemented this solution for input fields: reagent/src/reagent/impl/input.cljs Lines 34 to 74 in 886d203
But it relies on selection API being present on the input: reagent/src/reagent/impl/input.cljs Lines 9 to 10 in 886d203
I think But it doesn't appear as if |
Fixing for email type seems simple enough. Related: #504 |
Update to previous: fixing email isn't any simpler than other cases, browser doesn't provide the necessary Selection API methods for those inputs. |
Inputs of type
:email
and:number
exhibit the controlled-input cursor bug: as you type, the cursor will always reappear at the end end of the input. Inputs of type:text
and:password
don't exhibit this behavior.Little repo to repro: https://github.com/flyingmachine/reagent-react-18-controlled-input
The text was updated successfully, but these errors were encountered: