Skip to content

Touch and hold to download an image in mobile browser #269

Discussion options

You must be logged in to vote

While yet-another-react-lightbox does not provide a configuration option for this, you can override the existing implementation with the following CSS:

.yarl__slide_image {
  -webkit-touch-callout: initial;
}

You may also need to disable user-select on the whole lightbox to prevent awkward text/image selection side-effect of a touch callout:

.yarl__root {
  user-select: none;
  -webkit-user-select: none;
}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ruben-sandoval
Comment options

Answer selected by igordanchenko
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants