zotero / web-library

Other
141 stars 45 forks source link

Add a warning in older browsers when trying to open attachment in a reader #548

Open tnajdek opened 1 week ago

tnajdek commented 1 week ago

While web library supports browsers as old as FF60 and Safari 11, Reader can really only support browsers that both, pdf.js and epub.js, support. Even in legacy build pdf.js seems to depend on some relatively modern browser features and currently their target is Safari 16, though I believe Safari 15 will also work.

I've made an attempt to extend this compatibility but maintaining this is not feasible. I believe that instead we should just test for features that pdf.js requires (e.g. structuredClone API seems to be a good candidate) and display an error message in browsers that lack this feature (currently we attempt to load pdf.js, which results in an error in the console and "forever" spinner in the UI).

tnajdek commented 1 week ago

I believe we also need to hide or disable the "Export with Attachments" option in the attachments list based on the same criteria, as this feature also depends on pdf.js.