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 issue that paste will remove cache #2900

Merged
merged 3 commits into from
Dec 10, 2024
Merged

Conversation

JiuqingSong
Copy link
Collaborator

I found that when paste, we will always use cloned model as target model, although the model content is the same, but it will clear all caches so that after paste we need to rerender the whole content.

It is because of a code bug that we always assign modelBeforePaste to clipboardData even for the first paste, so when we merge paste model, it is always treated as second paste.

To fix it, add a parameter to tell mergePasteContent API that it is a first paste although there is modelBeforePaste in clipboardData. Then we will not clone model again, so caches can be preserved.

@JiuqingSong
Copy link
Collaborator Author

@BryanValverdeU can you help approve again? Thanks

@JiuqingSong JiuqingSong merged commit 0f788b1 into master Dec 10, 2024
7 checks passed
@JiuqingSong JiuqingSong deleted the u/jisong/fixpaste branch December 10, 2024 17:43
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.

3 participants