Cursor jumps to end of search params bound input #3162
Open
Description
Which project does this relate to?
Router
Describe the bug
It's common to bind a Filter input to search params so that URLs can be shared, and a user should be able to type anywhere in the input and it behave predictably.
Current behaviour of this isn't predictable though, if you type into the end of an input it behaves fine, but if you type into the middle, the cursor jumps to the end.
I suspect this is because startTransition is called by default under the hood now, but there doesn't appear to be a way to disable this behaviour or any past github issue which describes a workaround or fix
Your Example Website or App
Example project: search-validator-adapters
Steps to Reproduce the Bug or Issue
- Boot up the search-validator-adapters example project
- Navigate to a tab (I like the zod one 😉)
- Type some text into the input
- Change cursor position to middle of the text
- type 1 character
- the cursor jumps to the end 😱
Expected behavior
Typing anywhere in the input types where your cursor is and retains cursor position
Screenshots or Videos
Platform
- OS: Mac and Windows
- Browser: Chrome (tested)
Additional context
No response
Metadata
Assignees
Labels
No labels