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

Fixes:Inconsistent Behaviour of play-sketch button #2852

Conversation

Mubashirshariq
Copy link
Contributor

Fixes #2642

Changes:

I have verified that this pull request:

  • has no linting errors (npm run lint)
  • has no test errors (npm run test)
  • is from a uniquely-named feature branch and is up to date with the develop branch.
  • is descriptively named and links to an issue number, i.e. Fixes #123

Copy link
Collaborator

@lindapaiste lindapaiste left a comment

Choose a reason for hiding this comment

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

Can you explain how this solves the problem? I don't understand.

@Mubashirshariq
Copy link
Contributor Author

I added a ref called previewFrameRef to store the PreviewFrame instance. Then, I passed this ref to the PreviewFrame component using the ref prop. This ensures that the same PreviewFrame instance is maintained across different views or modes, preserving the state and functionality of the iframe

@lindapaiste
Copy link
Collaborator

I added a ref called previewFrameRef to store the PreviewFrame instance. Then, I passed this ref to the PreviewFrame component using the ref prop. This ensures that the same PreviewFrame instance is maintained across different views or modes, preserving the state and functionality of the iframe

But don't we have two different places in the code with <PreviewFrame>? The other one is at line 196.

@Mubashirshariq
Copy link
Contributor Author

@lindapaiste sorry i actually forgot to commit that

@lindapaiste lindapaiste added the Area:Preview For features and bugs relating to the embedded preview sketch label Jan 9, 2024
@raclim
Copy link
Collaborator

raclim commented Jun 3, 2024

Thanks for working on this! Due to the amount of time that's passed I'm going to close this PR for now. Please feel free to reopen this or check out our other issues!

@raclim raclim closed this Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area:Preview For features and bugs relating to the embedded preview sketch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inconsistent Behavior of Play-Sketch Button Between PC and Mobile Modes
3 participants