angular2-json-schema-form icon indicating copy to clipboard operation
angular2-json-schema-form copied to clipboard

Cursor moves on edits

Open tmburnell opened this issue 7 years ago • 3 comments

Issue type

I'm submitting a (check one): [x] Bug report [ ] Feature request [ ] Regression (something that used to work, but stopped working in a newer version) [ ] Support request [ ] Documentation issue or request

Prerequisites

Before posting, make sure you do the following (check all): [x] Confirm you are using the latest versions of all necessary packages (or if not, explain why not) [x] Search GitHub for a similar issue or PR [ ] If submitting a Support request, also search [Stack Overflow][stack-overflow] for similar issues Note: Please cross-post GitHub support requests to [Stack Overflow][stack-overflow], and include a link in your GitHub issue to your Stack Overflow question. We do currently respond to support requests on GitHub, but we eventually expect to stop, and will then refer all support questions exclusively to Stack Overflow.

Current behavior

If you are using 2-way binding: Edit an input from the beginning or middle of the string. You will notice after the first character, the curser will move to the end of the line.

Expected behavior

When updating the data the cursor should not move on you.

IMPORTANT: How can we reproduce your problem?

just use 2-way binding and edit a value

Any other relevant information

My assumption is that when 2-way binding was done (#51) it was more forced by cloning and pushing updates ... rather than using angular's default binding.

tmburnell avatar Jan 16 '18 20:01 tmburnell

Facing the same issue in angular6-json-schema-form as well. Is there an update on this?

vikramlc avatar Jul 27 '20 16:07 vikramlc

I am also facing it and trying to find a workaround.

jmpereztorres avatar Aug 19 '20 03:08 jmpereztorres

In the end I disabled the two-binding and create a 'fake' onSubmit from the parent component through 'ViewChild' to copy the value to the parent component attribute manually.

I execute the onSubmit function in a custom button before other operations.

I don't know how efficient is it because I am an angular newbie but it works :)

jmpereztorres avatar Aug 19 '20 05:08 jmpereztorres