-
Notifications
You must be signed in to change notification settings - Fork 176
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
Cursor jumps to end of input when using Stickit + Html5 email input type and webkit #15
Comments
+1 also seeing this. |
@kbaribeau Thanks for the vid - that is very helpful. I'm having a hard time replicating. Can you let me know what version you are running and any other specifics about your environment. I setup the following fiddle which uses master and it looks fine: |
Hey, so it turned out I had a second stray event firing that was also changing the value of our email field, which caused the cursor jump. Thanks for looking, sorry for the trouble. |
I'm getting this exact same issue (in your jsfiddle) with the latest version of stickit. |
Are you using an additional plugin for validation @KidkArolis ? That's how we ran into this issue in the first place; solved by eliminating the extra plugin we were using 👍 |
The problem is here: observeModelEvent('change:'+attr, function(options) {
if (options && options.bindKey != bindKey)
updateViewBindEl(self, $el, config, getVal(model, modelAttr, config, self), model);
}); The callback signature is wrong, it should be observeModelEvent('change:'+attr, function(model, val, options) {
if (options && options.bindKey != bindKey)
updateViewBindEl(self, $el, config, getVal(model, modelAttr, config, self), model);
}); |
Just leaving this here in case it helps somebody... I was having the same issue. It turned out I was calling this.stickit() on my view every time the model was validated, which was on each keypress... If you call it that much, you're gonna have a bad time. |
Hey all,
I just started using stickit and I love it, BUT, I have this issue.
If my template is using the html5 email input type like so:
In my view I have these bindings:
Typing initially into the textbox is fine, but when I try to change it, my cursor gets moved to the end of the line.
Here's a short video: https://dl.dropbox.com/u/80354/stickit-thing.swf
I was able to reproduce this in Safari, Chrome, and the iOS Simulator, but not Firefox.
Thanks!
The text was updated successfully, but these errors were encountered: