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

Knockout and pasting text which spans multiple fields #82

Open
delvesoftware opened this issue Mar 16, 2015 · 1 comment
Open

Knockout and pasting text which spans multiple fields #82

delvesoftware opened this issue Mar 16, 2015 · 1 comment
Labels

Comments

@delvesoftware
Copy link

I've got a few text input fields one after the other, the first one is 6 characters long, the second is 8 the third is 30 long.

If I paste some text that is 20 characters long into the first box AutoTab does a nice job of splitting the text into each of the boxes that follows. Awesome!

But when these fields are bound using Knockout the code in the 'drop paste' event causes Knockout to get a bit confused.

What's happening is Knockout is getting the event for the original 20 character text in the first field but not an event once that text is filtered to 6 characters, and this continues for the following fields.

I work around the issue by firing

$(e).trigger('input');

before each appropriate

$(e).trigger('autotab-next');

Which causes the knockout binding to relalise that the field has now changed since being filtered.

:-)

@Mathachew
Copy link
Owner

Sorry for the delayed response. Thanks for the info, I'll definitely look into this further.

@Mathachew Mathachew added the bug label Mar 31, 2015
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

2 participants