Skip to content

Conversation

liliakai
Copy link

When using a text input rather than textarea, updating the value moves
the cursor to the end of the line. Since core triggers setInputData on
every keystroke, this makes it impossible to highlight, copy, paste, or
move the cursor within the text.

Fix by only updating the value if it has changed.

I believe this also fixes the following known issue:
http://github.com/alexgorbatchev/jquery-textext/issues/50

When using a text input rather than textarea, updating the value moves
the cursor to the end of the line. Since core triggers setInputData on
every keystroke, this makes it impossible to highlight, copy, paste, or
move the cursor within the text.

Fix by only updating the value if it has changed.

I believe this also fixes the following known issue:
http://github.com/alexgorbatchev/jquery-textext/issues/50
@kenglxn
Copy link

kenglxn commented Sep 2, 2014

+1

@liliakai
Copy link
Author

liliakai commented Sep 2, 2014

you open the PR
bats fly 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

Successfully merging this pull request may close these issues.

2 participants