开发者

Unreadable text using setCustomValidity on password field in chrome

If I set an error message using setCustomValidity on an html5 form password field, it pops up as bubbles or stars, just like the password field itself, resulting in an unreadable message.

Here's a jsfiddle for demonstrate what I mean: http://jsfiddle.net/LcfuQ/1/

Th开发者_如何学Pythonis works in Firefox 4, but I get this strange behavior using Google Chrome. Anyone know of a workaround, or some way to fix this?

EDIT: This has been fixed in version 12+


Seems like this is a problem with Chrome

When the input type="password", asterisks are shown in the place of characters even for HTML5.

See this fiddle in Chrome http://jsfiddle.net/idiotsden/RdwMw/ . It works in ff4.

The workaround is to use jquery tools. You can see the working tutorial here

http://flowplayer.org/tools/demos/validator/custom-validators.html


It's a WebKit bug with the -webkit-text-security CSS property, which can't be overridden. It's likely already been reported on the WebKit Bugzilla, but if it isn't you might want to report it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜