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

Live binding does not maintain the cursor position. #356

Closed
vivoices opened this issue Apr 12, 2013 · 2 comments
Closed

Live binding does not maintain the cursor position. #356

vivoices opened this issue Apr 12, 2013 · 2 comments
Labels
Milestone

Comments

@vivoices
Copy link

This Fiddle:
http://jsfiddle.net/vivoices/CGPfA/
shows how LiveBinding receives text from an input element and then updates the element resulting in the cursor jumping to the end of the text.

Would it be possible to include an optional flag in the LiveBinding smart-tag, that, if set to true, prevents the template to update an element's value only in the case that the data change came from the same element?

@schovi
Copy link
Contributor

schovi commented Apr 12, 2013

In my current project I made Control for two way bindings. It is little bit more complicated.
It supports can.Observe or can.compute
https://gist.github.com/schovi/5374759
If you wish i have LiveChecked Control for supports checkbox and radio

@justinbmeyer justinbmeyer changed the title LiveBinding Loopback Live binding does not maintain the cursor position. Feb 11, 2015
cklanac added a commit that referenced this issue Feb 16, 2015
Issue #356 when updating an input the cursor jumps to the end of the field. The problem is the input value is being set on each event. This fix prevents the value from being set if it equals the incoming value. Fixes #356
@daffl daffl added this to the 2.2.0 milestone Feb 16, 2015
@daffl
Copy link
Contributor

daffl commented Feb 16, 2015

Closed via #1452

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

No branches or pull requests

5 participants