workaround to prevent Slate getting too empty when undoing RT pastes

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
pull/21833/head
Michael Telatynski 2018-07-20 15:06:27 +01:00
parent 855f8871b8
commit 93abb4b74b
No known key found for this signature in database
GPG Key ID: 3F879DA5AD802A5E
1 changed files with 3 additions and 2 deletions

View File

@ -983,8 +983,9 @@ export default class MessageComposerInput extends React.Component {
// that we will silently discard nested blocks (e.g. nested lists) :(
const fragment = this.html.deserialize(transfer.html);
return change
.setOperationFlag("skip", false)
.setOperationFlag("merge", false)
// XXX: this somehow makes Slate barf on undo and get too empty and break entirely
// .setOperationFlag("skip", false)
// .setOperationFlag("merge", false)
.insertFragment(fragment.document);
} else {
// in MD mode we don't want the rich content pasted as the magic was annoying people so paste plain