How do you disable click events from the contextmenu event when using Ctrl+Click in Safari for Mac?

前端 未结 3 684
时光说笑
时光说笑 2020-12-10 14:19

When using ctrl+ click to fire a contextmenu event (Context.JS) in Safari on Mac OS 10.9, the mousedown/up/click events also fire. This causes the menu to be closed. The e

3条回答
  •  臣服心动
    2020-12-10 14:55

    Are you trying to block against people copying specific sets of text or general content?

    ID/ELEMENT/CLASS {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    }
    

    maybe this is of use. http://jsfiddle.net/gnh2tuyj/2/

提交回复
热议问题