Live binding does not maintain the cursor position. #356

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

Comments

Projects
None yet
5 participants
@vivoices

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

This comment has been minimized.

Show comment
Hide comment
@schovi

schovi Apr 12, 2013

Contributor

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

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 from LiveBinding Loopback to Live binding does not maintain the cursor position. Feb 11, 2015

@justinbmeyer justinbmeyer added the bug label Feb 11, 2015

cklanac added a commit that referenced this issue Feb 16, 2015

Prevents input from being reset so cursor position is maintained
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

This comment has been minimized.

Show comment
Hide comment
@daffl

daffl Feb 16, 2015

Contributor

Closed via #1452

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