开发者

preventing magnifier to appear

开发者 https://www.devze.com 2023-03-13 03:39 出处:网络
I want to show my own popup when a text is selected and mouse is clicked for 1-2 seconds. I can get it working in FF/Chrome but in iphone/ipad\'s safari when I tap a text for sometime a magnifier appe

I want to show my own popup when a text is selected and mouse is clicked for 1-2 seconds. I can get it working in FF/Chrome but in iphone/ipad's safari when I tap a text for sometime a magnifier appears, how to prevent that magnifier and show my o开发者_C百科wn popup?


I don't have all the answers for showing your own popup (that'll require some JS hacking), but to get rid of that magnifying glass, just add this to your CSS:

body {
  -webkit-touch-callout: none;
}

...Or just add to the element you want to disable the magnifier on.

0

精彩评论

暂无评论...
验证码 换一张
取 消