Closed GoogleCodeExporter closed 9 years ago
As a note, we found this bug when we added a watermark into a text field that
specifies an example of what the input could be.
Original comment by mhaec...@gmail.com
on 1 Jul 2013 at 2:06
Read the Troubleshooting section on the project home page.
Original comment by t...@speednet.biz
on 1 Jul 2013 at 9:50
https://code.google.com/p/jquery-watermark/#Can't_enter_the_same_text_as_the_wat
ermark
This describes a workaround for the issue. Is it possible to distinguish
whether the watermark text has been set explicitly by the plugin when it
encountered empty text versus when the user has entered the watermark text?
Original comment by robert.b...@goodpoint.de
on 2 Jul 2013 at 7:44
No, that's the way it works.
Original comment by t...@speednet.biz
on 2 Jul 2013 at 10:26
Out of curiosity, it does work if useNative is true. Wouldn't it be possible to
set a data-attribute when the placeholder text is entered (by the plugin) and
remove it when it is replaced by user input?
That way the plugin could distinguish the two settings and show the correct
stuff.
Original comment by mhaec...@gmail.com
on 2 Jul 2013 at 10:48
Out of curiosity, do you not want this to work in the watermark plugin?
Because it seems there are some options available to make this work, but
there's no sense in trying if you do not want to support this?
Original comment by mhaec...@gmail.com
on 5 Dec 2013 at 2:49
No, I would not want to change the way it works, although I do appreciate the
input. The number of browsers requiring non-native watermarks is shrinking,
and modern browsers can support styled watermarks (placeholders). So the edge
cases (which can be worked around as described in the troubleshooting section)
are not worth complicating the plugin.
If you really think someone is going to type "Username" into an input element
in which you have a watermark defined as "Username", then simply add some
spaces to the end of the watermark -- as described in the troubleshooting
section.
Original comment by t...@speednet.biz
on 5 Dec 2013 at 3:17
Original issue reported on code.google.com by
mhaec...@gmail.com
on 1 Jul 2013 at 2:05