Search code examples
iosmodal-dialogsavephotolong-press

IOS long press does not have "save image" option when image is in a modal div


Here's the example.

https://mariandioguardi.com/paintings/cat.asp?c=Not+So+%3Ci%3EStill+Life%3C%2Fi%3E

tap on a 300px image, you are shown a modal div with a 1200px image. But long-press on that modal image only gives options "copy - look up - share..."

Question: how can I enable the save-image (to photos) option?

Right-clicking Works fine on Win-10 pc running Chrome or edge, but the long-press method fails on both ipad and iphone - both safari and chrome. I am running IOS 13.2.3

I tried explicitly setting pointer-events to auto, but no difference.

Thanks! jb


Solution

  • It looks like it's because of these two things:

    1. #modal-outer has -webkit-touch-callout: none;

    2. .modal-img has pointer-events: none;