Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Unexpected behavior on [data-failed-once] #6
Brian, here is a little issue I discovered. It has more to do with user experience.
You know how when you are filling in a form for common fields (name, email, address), most browsers provide little drop down with history of what you filled in before? Well if you tried to fill a line, and it failed validation after you tabbed away from it and then came back to it, that dropdown will try to help you again. But [data-failed-once] keyup event keeps refreshing the field trying to validate it, as you type. As a result it keeps flickering which is very annoying, plus it's not letting user to use the browser dropdown.
I see why would you want to validate as you type, but then it creates unpleasant experience, especially for people who are used to reusing value from that dropdown. I think the expected behavior would be to validate on blur, maybe? What do you think? Or is there a way to disable the dropdown altogether, so at least it's not confusing?
I'm not sure if it qualifies as bug, rather than a unexpected feature :-)
This comment has been minimized.
This comment has been minimized.Show comment Hide comment
According to http://www.alistapart.com/articles/inline-validation-in-web-forms/ validating on blur is the best user experience. Keyup seems to add some complexity that people don't like. I tried to get around that by only validating on keyup after the field has failed validation once. But I think I'll just drop the keyup validation all together.
Yeah that seems to be a better solution to use blur event. I noticed one more thing, even if you disregard the inconvenience of not being able to use browser drop-down, the flickering it creates is beginning to drive some people crazy - I tested this on one of our customer reps, and she started cursing at the monitor :-)
Windows XP SP3 , dual core (E2180) @ 2ghz each with 3 GB of RAM. ( it's pretty decent, things like Photoshop - start up under 15 seconds)
I test mostly under windows & ie7 + ff - cause that's 90% of our traffic ( the rest are ie8, ie6, chrome & safari)
I'll try to test at home tonight on my mac.