nicolafranchini/VenoBox

option to disable lightbox on mobile when no native viewer (e.g. PDF)

eyaler opened this issue · 2 comments

thanks for venobox! i am using it in my PDF gallery template https://github.com/eyaler/projector
as it seems that mobile browsers do not have native PDF support I think it would be useful to have an option to disable the lightbox on mobile for e.g. PDF and just open the file

Hi, and thanks for the note, I never considered that option.
But how would you detect the lack of support for inline PDFs in a reliable way?

afaiu chrome and firefox mobile don't have this and safari seems to do it badly anyway. so i would use a media query eg:
@media (hover:none), (hover:on-demand) possibly with a user option.
In this case disable just PDF lightboxes (and perhaps there are similar cases to consider).
You can still help the user with options like open in same tab or new tab