Search code examples
magnific-popup

What might be preventing an iOS user from saving an image?


I'm currently using a lightbox plugin called Simple Lightbox and I'm encountering some issues. Right click > save as is not disabled on Chrome, but pressing and holding an image in the lightbox does not result in the option to save it on iOS devices. I was wondering if there are any javascript or css properties that I could look for in the code that might be preventing this action from occuring.

simple lightbox: http://simplelightbox.com/

github link: https://github.com/andreknieriem/simplelightbox


Solution

  • Well, I finally found the answer right after posting! I'll leave it here in case anyone stumbles upon this later.

    In //touchcontrols on simple-lightbox.js, I deleted the following:

    > `swipeStart    = 0,
                    swipeEnd     = 0,
                    swipeYStart = 0,
                    swipeYEnd = 0,
                    mousedown = false,
    

    I also disabled swiping to change photos. I hope this helps someone later on!