jquery-placeholder-plugin
jquery-placeholder-plugin copied to clipboard
Add Password Support
I know you've changed a large amount of the file structure in your repo, but I thought you might like to pick out the password commit, so that password fields can correctly have a placeholder applied.
Cheers
Urgh, that commit doesn't look very nice, vim appears to have messed with all the spacing. The main change is a new class in the settings, then a check in both the focus and blur events.
Hi Mal,
I finally got a chance to look at this. Running both our codes through the same beautifier helped me pick out the changes.
I also looked at #13 which also added password support. As I mentioned on that pull request, your implementation looks simpler to me, but if you have a chance to look at #13 and ensure Jacob hasn't caught something that you haven't thought of, that would be great!
Thanks for sending this back.
I've only checked this on IE8+, Chrome and Firefox current, so I cannot promise it works all the way back, however I definitely think it's a better solution unless there are browsers that my solution doesn't work with.
I checked in IE6, and changing the input type from text to password doesn't seem to work.
The answer recommended on SO is to create another input box, which is what @Jacobbolton does, so will try that approach.
Is IE6 relevant still? Even IE7 is on its way out now
Thats a fair question.
The whole point of this plugin is to provide placeholder support in browsers which don't support it, which is really only IE <10. IE6 and IE7 only make up 0.9%.
Then again, if its not too difficult to continue supporting old browsers then it causes no harm. At the moment, the plugin supports IE6. Only password support does not work.
According to the SO post, changing the input type to/from password is broken in all IE's, so this approach still wouldn't work.