-webkit-touch-callout equivalent for IE

后端 未结 3 371
一向
一向 2020-12-15 10:49

Using the Surface, it is possible to hold your finger on a link and get an option to copy it. This is undesired behavior for me. This can be disabled in iOS with:

         


        
3条回答
  •  半阙折子戏
    2020-12-15 11:10

    You can also cancel the default response by binding an event callback to the contextmenu event. This works in IE for touch like it always has in all browsers for mouse:

    window.addEventListener("contextmenu", function(e) { e.preventDefault(); })
    

提交回复
热议问题