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

fix(live-sample): fix live samples for safari #10775

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

fiji-flo
Copy link
Contributor

Summary

Lazy loading is tricky. Let's be more defensive.

This hopefully resolves #10764

Problem

It looked like we were hitting a weird race condition in Safari.

Checking for the source and removing the eventListener should only improve things. This also sets the initialized flag in the runner earlier to avoid races.


How did you test this change?

Locally but it's hard to reproduce.
Setting:

BUILD_LIVE_SAMPLES_BASE_URL=https://live.mdnyalp.dev

and disabling caching helps.

Lazy loading is tricky. Let's be more defensive.

This hopefully resolves  #10764

It looked like we were hitting a weird race condition in Safari.
So checking for the source and removing the eventListener should
only improve things. This also sets the initialized flag in the
runner earlier to avoid races.
@fiji-flo fiji-flo requested a review from a team as a code owner March 22, 2024 19:21
@@ -56,16 +56,21 @@ export function initPlayIframe(
typ: "init",
state: editorContent,
};
// Lazy loading is trick cross platform.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Lazy loading is trick cross platform.
// Lazy loading is tricky cross platform.

@caugner caugner marked this pull request as draft March 25, 2024 11:38
@caugner
Copy link
Contributor

caugner commented Mar 25, 2024

Converted to draft, as it doesn't resolve the issue (verified by deploying to stage).

@github-actions github-actions bot added the merge conflicts 🚧 Please rebase onto or merge the latest main. label Apr 18, 2024
Copy link
Contributor

This pull request has merge conflicts that must be resolved before it can be merged.

@github-actions github-actions bot added the idle label May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idle merge conflicts 🚧 Please rebase onto or merge the latest main. plus:playground
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Examples on page flicker white in Safari 17
3 participants