question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cursor jumps to end of input fields

See original GitHub issue

This bug was first reported here: https://community.frontity.org/t/cursor-jumping-on-controlled-input/789

Bug report

Describe the expected behavior

While tipying in an <input> component, the cursor must remain in place.

Describe the observed behavior

The cursor jumps to the end every time the value changes.

Describe the steps involved to reproduce the problem

Just add an <input> to your theme and test it.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:17 (14 by maintainers)

github_iconTop GitHub Comments

2reactions
solkimicrebcommented, Mar 25, 2020

Hi! I am the author of react-easy-state and I got an email about this issue. Just wanted to let you know that next release (with the cursor jumping fix) is coming early next week.

2reactions
luisherranzcommented, Nov 18, 2019

Yeah, that problem comes from the monkey patching of the native events done by react-easy-state to batch events under React’s unsafe_batchedUpdates: https://github.com/solkimicreb/react-easy-state/issues/92

I already offered my help to solve it in the original library and even found a solution that we could use in our own fork: https://codesandbox.io/s/react-easy-state-batch-bug-async-scheduler-6q2dt

I was waiting to hear from @solkimicreb first, to understand why he monkey patched instead of using async queues, but it seems like he is still missing.

If this is urgent we can implement my solution. Why did you opened this issue in the first place? Did some user reported the problem?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Input cursor jumps to end of input field on input event
The cursor jumps to end of the input value when user types in the middle. the last typed character (not the last character)...
Read more >
Text cursor jumps to the end of the text in the input field
1. Manually restart the app by right-clicking the icon in your taskbar (Windows) and selecting Quit. After you quit, click the app icon...
Read more >
Cursor jumps to end of input when inputValue is a controlled ...
Problem description: Visit this codesandbox; type text; move cursor to the left; type a letter; the letter will be added at the correct...
Read more >
Cursor jumps to end of field - Apple Community
Cursor jumps to end of field · Touch and hold the Space bar with one finger until the keyboard turns light gray. ·...
Read more >
The Curious Case of Cursor Jumping - Mutually Human
Cursor jumping is simply when the cursor jumps from one location to another, unexpectedly, while the user is typing into a text field....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found