Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hidden document viewer does not load pages in Firefox #40

Closed
jheth opened this issue May 28, 2014 · 7 comments
Closed

Hidden document viewer does not load pages in Firefox #40

jheth opened this issue May 28, 2014 · 7 comments

Comments

@jheth
Copy link

jheth commented May 28, 2014

We're seeing issues with viewer.js in Firefox where the document does not load when the containing element starts off as hidden.

Here's a jsbin example that works in Chrome and Safari but not in Firefox.
http://jsbin.com/xezafoko/1/edit

It shows a tabbed page where each tab contains a document viewer. The 2nd hidden tab starts to load but then stops and none of the pages are loaded.

@jheth jheth changed the title Document viewer failing in Firefox Unable to Hide/Show document viewer in Firefox May 30, 2014
@jheth jheth changed the title Unable to Hide/Show document viewer in Firefox Hidden document viewer does not load pages in Firefox May 30, 2014
@lakenen
Copy link
Contributor

lakenen commented Jun 2, 2014

Thanks for creating a reduced repro! I'm looking into this today, and I'll update this issue when I figure out the problem.

lakenen pushed a commit that referenced this issue Jun 2, 2014
There is a bug in Firefox where `window.getComputedStyle()`
returns null if called in a hidden (`display:none`) iframe
(https://bugzilla.mozilla.org/show_bug.cgi?id=548397), so we
fallback to a default value if this happens.
@lakenen lakenen closed this as completed in e52618c Jun 2, 2014
lakenen added a commit that referenced this issue Jun 2, 2014
Fix #40 - Hidden document viewer does not load pages in Firefox
@jheth
Copy link
Author

jheth commented Jun 16, 2014

Thanks for the fast response! Glad I could help.

@jheth
Copy link
Author

jheth commented Jun 16, 2014

@lakenen - Is this fix available when using the iframe viewer URL? I'm still seeing the issue in firefox: http://jsbin.com/xezafoko/3

@lakenen
Copy link
Contributor

lakenen commented Jun 16, 2014

The updated viewer.js has not been pushed to the iframe viewer yet, but it will be soon (hopefully today or tomorrow).

@lakenen
Copy link
Contributor

lakenen commented Jun 20, 2014

@jheth sorry for the delay. This should be live on view-api.box.com now.

@jheth
Copy link
Author

jheth commented Jun 23, 2014

@lakenen - Thanks! I just tested it with http://jsbin.com/xezafoko/4 and see both documents now. The viewer in the hidden tab shows a different zoom level which I assume is due to the default ratio.

@lakenen
Copy link
Contributor

lakenen commented Jun 23, 2014

@jheth the incorrect zooming appears to be a separate bug. I've created a ticket for it here: #74

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants