mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-02-01 05:16:10 +01:00
fix normalization for non-node operations
This commit is contained in:
parent
ca6920a88f
commit
4e9d262f9b
@ -407,6 +407,17 @@ function getDirtyKeys(operation, newValue, oldValue) {
|
||||
const oldDocument = oldValue.document
|
||||
|
||||
switch (type) {
|
||||
case 'add_mark':
|
||||
case 'insert_text':
|
||||
case 'remove_mark':
|
||||
case 'remove_text':
|
||||
case 'set_mark':
|
||||
case 'set_node': {
|
||||
const target = newDocument.assertNode(path)
|
||||
const keys = [target.key]
|
||||
return keys
|
||||
}
|
||||
|
||||
case 'insert_node': {
|
||||
const table = node.getKeysToPathsTable()
|
||||
const parent = newDocument.assertParent(path)
|
||||
|
Loading…
x
Reference in New Issue
Block a user