You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 6, 2023. It is now read-only.
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
0 commit comments