qualcentric-web-solutions / jquery-watermark

Automatically exported from code.google.com/p/jquery-watermark
0 stars 0 forks source link

keypress does not work with password field #66

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a input field with type="password"
2. Add a watermark to this input field
3. Add keypress event with jquery

What is the expected output? What do you see instead?
1) fired keypress event
2) Nothing

What version of the product are you using? On what operating system?
3.1.3 with jQuery 1.6.1

Please provide any additional information below.

Original issue reported on code.google.com by Zoi...@gmail.com on 3 Aug 2011 at 3:00

GoogleCodeExporter commented 8 years ago
Of course it doesn't work.  As the description states, the password field gets 
replaced by a text input in order for the plain text watermark to be visible.  
If you need to attach JavaScript events to a password field, the watermark 
plugin won't work with it.

I'll just say for the record that monkeying around with javascript on a 
password field is generally not a good idea anyway.  Every browser treats 
password fields differently, and you're setting yourself up for broken pages.

Original comment by t...@speednet.biz on 3 Aug 2011 at 5:47

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
It is pretty common to type a password and hit enter for logging in.

Is there any workaround for this?

Original comment by hibbard....@gmail.com on 2 Apr 2012 at 9:13