nanatiris / jquery-watermark

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

Can I keep the watermark till the first character is typed? #6

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Right now, when a field gets the focus the watermark gets cleared.

Would it be possible to keep the watermark after getting the focus till the
user types in the first letter?

That would really be cool.

Original issue reported on code.google.com by gerwin.b...@gmail.com on 11 Sep 2009 at 4:23

GoogleCodeExporter commented 9 years ago
For many reasons, no.  

Primarily, that's not the way watermarks work across the Web.  Just try adding 
a 
comment to this issue, and you will see the Google watermark functionality act 
just 
like the plugin does.

It would add a layer of confusion for many users, as they would try deleting 
characters that seemingly have been mistakenly left in the input space.

Further, it would add additional complexity to the code, bringing it further 
and 
further from a light-weight solution.

Finally, a watermark is the wrong solution for what you want.  The 
functionality you 
describe is already available, and is a convention of the Windows operating 
system.  
When you tab into a field, the browser (or Windows) highlights all the text in 
the 
space, and upon the first keystroke it is replaced.

If you're going to have an input space that leaves text in the entry space 
until a 
key is pressed, that is the proper way to do it.  

You can do that by calling the .select() function on the element in the focus 
event.

Original comment by t...@speednet.biz on 11 Sep 2009 at 5:55

GoogleCodeExporter commented 9 years ago

Original comment by t...@speednet.biz on 11 Sep 2009 at 6:20

GoogleCodeExporter commented 9 years ago
Thanks for the detailed explanation...

Good thoughts on usability. Thx!

Original comment by gerwin.b...@gtempaccount.com on 12 Sep 2009 at 8:35