我怎么美元在NG-DBLCLICK AngularJS p $ pvent选择文本? [英] How do I prevent selecting text in AngularJS on ng-dblclick?

查看:114
本文介绍了我怎么美元在NG-DBLCLICK AngularJS p $ pvent选择文本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有'()doSomthing 这工作得很好,但在选择元素中的文本太丑陋的一面效果的元素NG-DBLCLICK =。它有什么办法prevent呢?

I have an element with ng-dblclick='doSomthing()' which works fine, but has the ugly side effect of selecting the text in the element too. It there any way to prevent this?

推荐答案

尝试添加要prevent这些CSS规则到类或div的文本选择

Try to add these css rules to your class or div that you want to prevent the text selection of

.myClass {
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
}

这篇关于我怎么美元在NG-DBLCLICK AngularJS p $ pvent选择文本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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