openjournals / theoj

The Open Journal
http://theoj.org
MIT License
129 stars 10 forks source link

Debug pdf loading in Safari #261

Closed arfon closed 8 years ago

arfon commented 8 years ago

Since the update of webcomponents to 0.7.12 the site now loads in Safari (yay) but the PDF fails to load. See http://astro.theoj.org/review/arxiv:1207.6827v1 as an example.

Unfortunately it fails silently - @marcrohloff @stuartlynn any ideas how to go about debugging this?

marcrohloff commented 8 years ago

Maybe switch back if the manual height fixed it?

On Thu, Feb 11, 2016 at 2:40 PM, Arfon Smith notifications@github.com wrote:

Since the update of webcomponents to 0.7.12 the site now loads in Safari (yay) but the PDF fails to load. See http://astro.theoj.org/review/arxiv:1207.6827v1 as an example.

Unfortunately it fails silently - @marcrohloff https://github.com/marcrohloff @stuartlynn https://github.com/stuartlynn any ideas how to go about debugging this?

— Reply to this email directly or view it on GitHub https://github.com/openjournals/theoj/issues/261.

arfon commented 8 years ago

Maybe switch back if the manual height fixed it?

Regardless of whether the height is set manually the PDF still doesn't load unfortunately :-\

marcrohloff commented 8 years ago

But the PDF did load with the previous version of Polymer?

Marc

On Thu, Feb 11, 2016 at 3:34 PM, Arfon Smith notifications@github.com wrote:

Maybe switch back if the manual height fixed it?

Regardless of whether the height is set manually the PDF still doesn't load unfortunately :-\

— Reply to this email directly or view it on GitHub https://github.com/openjournals/theoj/issues/261#issuecomment-183086914.

arfon commented 8 years ago

No the site didn't load at all in Safari with the previous version (0.5.4) of webcomponents.

marcrohloff commented 8 years ago

Maybe it would be worth updating PDF JS from 1.0 to 1.3 ?

Marc

On Thu, Feb 11, 2016 at 3:51 PM, Arfon Smith notifications@github.com wrote:

No the site didn't load at all in Safari with the previous version (0.5.4) of webcomponents.

— Reply to this email directly or view it on GitHub https://github.com/openjournals/theoj/issues/261#issuecomment-183091232.

arfon commented 8 years ago

Maybe it would be worth updating PDF JS from 1.0 to 1.3?

Just did this in https://github.com/openjournals/theoj/commit/7d010bf61c88fef5db3885ab5caac5d287e76ef3 and unfortunately the PDFs still don't show (at all) even though the site renders now pretty well.

freelanceastro commented 8 years ago

The problem is that the PDF is loading (hence the silent fail), but it's being displayed in an element that's 2px high. This is a CSS problem: CSS sets the height of the stacked-pdf-reader element at 100%, but for some reason Safari doesn't understand this. We can solve this temporarily by eliminating that line of CSS -- doing so reveals the PDF in Safari, and preserves PDF display in Chrome (and presumably in FF and IE). The only catch is that this causes the PDF to look blurry if the window is resized to a much larger size. That, to me, is acceptable right now.

freelanceastro commented 8 years ago

Our CSS hack doesn't resolve the underlying issue, but we have this working for now, so I'm going to close this issue.