Joss: PDF embed's height is tiny

Created on 2 Aug 2019  Â·  14Comments  Â·  Source: openjournals/joss

Seems to not happen some of the time, and resizing the page fixes it, but paper pages usually load to this:

Screenshot_2019-08-02 fmcmc A friendly MCMC framework

As you can see the embedded PDF's height is wrong (141px).

Firefox desktop 68.0.1, Ubuntu 18.04.

Most helpful comment

@arfon it seems fixed for me now. The PDF views are immediately large enough.

All 14 comments

Also when it does expand, it is too big, meaning I have to scroll on the page after scrolling in the embed to see the bottom of the document.

Screenshot_20190802_145328

@remram44 @Kevin-Mattheus-Moerman - can you take a look again and see if this issue is now fixed?

No change for me, sorry

Yeah still tiny. It is fixed if I resize or refresh the page.

Peek 2019-08-08 16-03

@xuanxu - might changing https://github.com/openjournals/joss/blob/searchkick/app/assets/javascripts/papers.coffee#L27 to $(window.ready) -> help here? I'm wondering if the function to resize the height is being called too soon.

@remram44 @Kevin-Mattheus-Moerman - could you take another quick look? I tried modifying the JavaScript on the page load.

Also, sorry I have to keep pinging you for feedback - I can't replicate this in Firefox locally :grin:

@arfon I’m not sure, $() is a shortcut for $(document).ready() so I’d expect no changes. Maybe we should wait not for the page but for the embed pdf reader to be loaded...

Maybe we should wait not for the page but for the embed pdf reader to be loaded..

Right. I'm not sure if that's possible though for <object> embeds like we're doing. I might need to switch to using PDF JS to fix this...

The size is good now (but I changed location and this might be a timing issue, maybe faster internet plays a role?)

I might need to switch to using PDF JS to fix this...

Naah, I'm sure we can fix it with the current object. Let me try a couple things.

@arfon it seems fixed for me now. The PDF views are immediately large enough.

@remram44 - @xuanxu made an even better fix in https://github.com/openjournals/joss/pull/577 - can you confirm this fixes things for you?

I can confirm I don't experience the problem anymore! Thank you everyone :smiley:

✨

Was this page helpful?
0 / 5 - 0 ratings

Related issues

davclark picture davclark  Â·  5Comments

Datseris picture Datseris  Â·  5Comments

dpsanders picture dpsanders  Â·  3Comments

physicsdavid picture physicsdavid  Â·  4Comments

arfon picture arfon  Â·  3Comments