-webkit-touch-callout equivalent for IE

后端 未结 3 362
一向
一向 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:06

    named slightly differently for everything else.

    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    
    0 讨论(0)
  • 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(); })
    
    0 讨论(0)
  • 2020-12-15 11:18

    You might be looking for:

    -ms-touch-select:   none;
    -ms-touch-action:   none;
    

    Together with above, I also use this on body{} for auto hiding scrollbars in IE 10:

    -ms-overflow-style: -ms-autohiding-scrollbar;
    

    There are more here: http://msdn.microsoft.com/en-us/library/windows/apps/hh996923.aspx

    0 讨论(0)
提交回复
热议问题