使用chrome中密码字段的setCustomValidity的不可读文本 [英] Unreadable text using setCustomValidity on password field in chrome

查看:160
本文介绍了使用chrome中密码字段的setCustomValidity的不可读文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我在html5表单密码字段中使用setCustomValidity设置了一条错误消息,它会像泡泡或明星一样弹出,就像密码字段本身一样,导致消息不可读。

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.

这里有一个jsfiddle来演示我的意思: http://jsfiddle.net/LcfuQ/1/

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

这适用于Firefox 4,但我使用Google Chrome获得了这种奇怪的行为。任何人都知道解决方法或解决这个问题的方法?

This works in Firefox 4, but I get this strange behavior using Google Chrome. Anyone know of a workaround, or some way to fix this?

编辑:这已在版本12 +中修复

推荐答案

似乎这是Chrome的问题

Seems like this is a problem with Chrome

当input type =password ,即使是HTML5,星号也会显示在字符的位置。

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

在Chrome中查看这个小提琴 http://jsfiddle.net/idiotsden/RdwMw/ 。它工作在ff4。

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

解决方法是使用jQuery工具。您可以在这里看到工作教程

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

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

这篇关于使用chrome中密码字段的setCustomValidity的不可读文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆