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

[BUG, ERROR] iFrames don't load on Firefox #83

Closed
winstonrc opened this issue Aug 23, 2022 · 5 comments
Closed

[BUG, ERROR] iFrames don't load on Firefox #83

winstonrc opened this issue Aug 23, 2022 · 5 comments

Comments

@winstonrc
Copy link
Contributor

Describe the bug
I have to use Chrome to see the external content loaded in an iFrame throughout the book.

To Reproduce
Steps to reproduce the behavior:

  1. Go to any page with an iFrame. Example: https://discoverthreejs.com/book/first-steps/textures-intro/
  2. Observe the demo for the head by Lee Perry-Smith doesn't load in Firefox but does in Chrome.

Desktop (please complete the following information):

  • OS: Fedora Linux
  • Browser Firefox
  • Version 103.0.2 (64-bit)
@looeee
Copy link
Owner

looeee commented Aug 27, 2022

Confirmed, thanks for the heads up.

I think this is caused by three.js examples switching to import maps which are not supported in Firefox.
There's a polyfill but maybe it doesn't work in an iframe? If that's the case this could be tricky to fix.

@winstonrc
Copy link
Contributor Author

winstonrc commented Aug 27, 2022

It looks like import maps are on Mozilla's and mrdoob's radars.

Perhaps for now a simple banner at the start of the book recommending Chrome would be helpful for pointing readers in the right direction.

@winstonrc
Copy link
Contributor Author

This comment points towards the fix: https://discourse.threejs.org/t/bug-importmap-isnt-suppored-by-firefox-and-safari/41716/4

Essentially, in Firefox the user has to navigate to about:config and set dom.importMaps.enabled to true. This solves the issue upon refreshing the page.

It's a bit of effort for the average user, but maybe a quick note at the beginning of the course would be useful.

I believe the issue still remains in Safari, but I don't have any Apple devices at the moment to test.

@looeee
Copy link
Owner

looeee commented Aug 28, 2022

maybe a quick note at the beginning of the course would be useful.

Yeah that's a good idea. I will do this when I'm next doing updates (later this week hopefully).

In the longer term I want to stop referencing three.js examples as iframes, they break too easily. See #5

@winstonrc
Copy link
Contributor Author

winstonrc commented Jan 20, 2023

They appear to be working for me now on version 109.0 (64-bit).

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