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

Fix answer field editing #174

Closed
psfinaki opened this issue Jul 15, 2018 · 1 comment
Closed

Fix answer field editing #174

psfinaki opened this issue Jul 15, 2018 · 1 comment
Assignees

Comments

@psfinaki
Copy link
Owner

For some reason, cursor in the answer field behaves weirdly:

  1. Type something there, e.g. answer
  2. Move cursor in the middle of the word, i.e. between s and w
  3. Type a letter or remove one
  4. Cursor moves to the end of the word

This should be fixed, this is even more inconvenient from mobile.

@psfinaki psfinaki added the task label Jul 27, 2018
@psfinaki psfinaki added this to the Version 2 milestone Jul 27, 2018
@psfinaki
Copy link
Owner Author

The whole thing is not as trivial as expected.

It is related to some internal React rendering mechanisms I am not very good at. The issue is common, described e.g. here or here. Basically, cursor reset is a side effect of changing the input value programmatically.

The above links have some workarounds - none of them are trivial and require diving into JS. JavaScript generated by Fable is again a separate topic for me, so I have decided to postpone the issue and have another take in some time.

@psfinaki psfinaki removed this from the Version 2 milestone Aug 10, 2018
@psfinaki psfinaki added this to the Version 11 milestone Dec 26, 2018
@psfinaki psfinaki removed this from the Version 11 milestone Jan 10, 2019
@reflash reflash self-assigned this Oct 16, 2019
@reflash reflash closed this as completed Oct 22, 2019
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