为什么不应该在用户/代理可以选择一个电子邮件地址或号码? [英] Why shouldn't a user/agent be able to select an email address or a number?
问题描述
的Chrome已经推出了一个变化就是在我的测试造成这一错误号码输入
Chrome has rolled out a change to number inputs that is causing this error in my tests
未捕获InvalidStateError:无法读取HTMLInputElement的selectionStart'属性:输入元素的类型('编号')不支持选择
我想知道为什么一个电话/电子邮件输入不能选择,能够(原文如此)?
I want to understand why should a number/email input not be select-able (sic)?
推荐答案
由于该标准定义如此。
<一href=\"http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary\" rel=\"nofollow\">http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary
我们没有办法拿到类型=电子邮件和类型=因为IDNA的数量,价值消毒和本地化的precise显示值。因此,设置/获取选择信息是没有意义的。
We have no ways to get precise display values of type=email and type=number because of IDNA, value sanitization, and localization. So setting/getting selection information makes no sense.
这篇关于为什么不应该在用户/代理可以选择一个电子邮件地址或号码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!