Skip to content
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

Cursor position jumps to the end of input when state is controlled outside the hook #1620

Closed
pirkkahuhtala opened this issue Aug 19, 2024 · 2 comments

Comments

@pirkkahuhtala
Copy link

  • downshift version: 9.0.8
  • node version: 18
  • npm (or yarn) version:

What you did:

I try to control the state outside the hook.

What happened:

Whenever I write something to the input and then move my cursor to the beginning of the string
and type something new the cursor jumps to the end of the string. If I let the hook control the state there is no issue with it.

Reproduction repository:
https://codesandbox.io/p/sandbox/silent-worker-vzyycm

Problem description:
The cursor jumps to the end of the input

Suggested solution:
The behaviour would be the same wether the state is controlled internally or externally.

@silviuaavram
Copy link
Collaborator

We cannot fix this, unfortunately. Maybe you can find a workaround.

#217

@pirkkahuhtala
Copy link
Author

Thank you! I'll try it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants