This repository has been archived by the owner on Feb 6, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed a bug causing block data being over-written when pasted.
Summary: there is a bug in Draft JS replace fragment logic where it replaces block data directly with the fragment's block data. That causes things like notice block loses it's data when pasted from other blocks. The diff introduces a new parameter to allow the data on the block to be merged instead of replaced. That way we could preserve the original data as well as merging from the fragment's data (if available). Note that in our use case, old data take precedence - for exmaple, if you paste from a "note" notice to a "warning" notice, the resulting notice should still be warning instead of "note". Differential Revision: D16167295 fbshipit-source-id: 6e525d2263014e0666928077a71d9d406bd68143
- Loading branch information
1 parent
0e88544
commit 82e2135
Showing
2 changed files
with
22 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters