关于IOSinput框获取焦点延迟的问题。
这个问题,在vue组件封装组件中比较明显,点击的时候无法立即获取到焦点,需要点击好几次或者长按。这样就很不友好,网上看到方案input, textarea{-webkit-user-select: auto!important;-khtml-user-select: auto!important;-moz-user-select: auto!important;-ms-u...
·
这个问题,在vue组件封装组件中比较明显,点击的时候无法立即获取到焦点,需要点击好几次或者长按。这样就很不友好,
网上看到方案
input, textarea{
-webkit-user-select: auto!important;
-khtml-user-select: auto!important;
-moz-user-select: auto!important;
-ms-user-select: auto!important;
-o-user-select: auto!important;
user-select: auto!important;
}
利用user-select属性去实现。该属性的具体大家自行百度
加上之后发现也不是太好使,但是不用长按 偶尔延迟的能获取到。后面想到配合上label标签,去增加它的点击范围。
更多推荐
已为社区贡献1条内容
所有评论(0)