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

Fixed cursor reset when changing value of input. #601

Merged
merged 1 commit into from
Nov 28, 2016
Merged

Fixed cursor reset when changing value of input. #601

merged 1 commit into from
Nov 28, 2016

Conversation

robinheghan
Copy link
Contributor

Problem

Whenever changing an input's value, the cursor is reset to the end of the input. Not noticable unless you try to change something in an input value that is not at the end.

How to reproduce

With the following Eve program:

commit @browser
  [#input]

Fill in the input with a string. Move the cursor to the beginning of the string (or anywhere not at the end). Write something. You'll see that it's impossible to add something without the cursor resetting to the end of the string.

Solution

The solution is actually very simple, and hinted at in renderer.ts, simply use setAttribute instead of setting the input value directly.

@ibdknox
Copy link
Contributor

ibdknox commented Nov 28, 2016

@Skinney Thanks!

@joshuafcole I thought we had previously fixed this problem? I'm surprised it's come again and we didn't notice.

@ibdknox ibdknox merged commit 4bab119 into witheve:master Nov 28, 2016
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