0

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 own popup?

coure2011
  • 40,286
  • 83
  • 216
  • 349

1 Answers1

1

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.

David Kaneda
  • 5,320
  • 1
  • 21
  • 14
  • that doesn't seem to work for me. can you reference some documentation? – rryter Feb 25 '14 at 13:28
  • This does not work in iOS9. Refer this [SO question](http://stackoverflow.com/questions/33106437/iphone-on-long-press-causing-some-rectangular-magnifier-to-pop-up). – domino_katrino Dec 11 '15 at 04:52