jquery-placeholder-plugin icon indicating copy to clipboard operation
jquery-placeholder-plugin copied to clipboard

Add Password Support

Open snikch opened this issue 12 years ago • 6 comments

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

snikch avatar Mar 14 '13 21:03 snikch

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.

snikch avatar Mar 14 '13 21:03 snikch

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.

andrewrjones avatar Apr 22 '13 21:04 andrewrjones

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.

snikch avatar Apr 29 '13 01:04 snikch

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.

andrewrjones avatar May 06 '13 11:05 andrewrjones

Is IE6 relevant still? Even IE7 is on its way out now

hello-josh avatar May 06 '13 11:05 hello-josh

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.

andrewrjones avatar May 06 '13 12:05 andrewrjones