0
点赞
收藏
分享

微信扫一扫

el-input在ie浏览器下readonly属性出现光标


可以使用UNSELECTABLE attribute,加上该属性的元素不能被选中。

​​https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/hh801966(v=vs.85)​​

<el-input type="text" readonly unselectable="on"></el-input>

在IE浏览器中,当input获得焦点时,点击有unselectable="on"属性的标签时,不会触发onblur事件。

unselectable设置可选择性状态的字符串。

可能值:

  • off:默认值,选择过程可以从元素的内容开始。
  • on:无法在元素的内容中启动选择过程。

这种情况主要是解决IE浏览器中的光标出现问题。火狐浏览器中不支持。


举报

相关推荐

0 条评论