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

Docs: Fix white flash on iframe load for Safari #29419

Merged
merged 5 commits into from
Sep 17, 2024

Conversation

JeremyJaydan
Copy link
Contributor

@JeremyJaydan JeremyJaydan commented Sep 16, 2024

Description
Navigating the documentation while using Safari the iframe responsible for loading page content flashes white as it's loading (see attached screen recoding).

Screen.Recording.2024-09-16.at.12.42.13.PM.mov

Safari Version 17.6 (19618.3.11.11.5)

Solution
Move the iframe "display none" out of the if condition so it's hidden before the src is set and "display unset" on iframe load/error regardless of the if condition. Not sure if the error listener is really needed but kept it there to be safe.

Edit (6834f41):
Moved the load/error event listeners to inside the if condition, which keeps the iframe hidden when there's no page selected.

Screen.Recording.2024-09-16.at.12.52.46.PM.mov

I'm new to contributing, let me know if there's anything else to do!

@JeremyJaydan
Copy link
Contributor Author

Re: 6834f41

Before:
Screenshot 2024-09-16 at 2 08 38 PM

After:
Screenshot 2024-09-16 at 2 09 14 PM

This was an oversight introduced by this PR which is fixed by the mentioned commit.

Fix code style.
docs/index.html Outdated Show resolved Hide resolved
@Mugen87 Mugen87 added this to the r169 milestone Sep 17, 2024
@Mugen87 Mugen87 merged commit 3fa40fe into mrdoob:dev Sep 17, 2024
3 checks passed
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

Successfully merging this pull request may close these issues.

2 participants