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: canvas data in iframe wasn't applied in the fast-forward mode #944

Merged
merged 5 commits into from
Jul 31, 2022

Conversation

YunFeng0817
Copy link
Member

In #853, I implemented the virtual dom for the fast-forward mode. But there is a corner case I didn't deal with.
If a canvas element is created with image data (serialized to rr_dataURL) in an iframe, it will be rebuilt as an empty canvas without the initial image data, in the fast-forward mode (using Virtual Dom optimization).
A simple test case is also added in this PR to reproduce this corner case.

@YunFeng0817 YunFeng0817 requested review from Yuyz0112 and Juice10 July 25, 2022 03:07
Copy link
Contributor

@Juice10 Juice10 left a comment

Choose a reason for hiding this comment

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

Good catch! Found one little tweak to make the code slightly more robust

packages/rrdom/src/diff.ts Outdated Show resolved Hide resolved
YunFeng0817 and others added 3 commits July 25, 2022 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants