mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-09-02 11:42:53 +02:00
fix normalization for non-node operations
This commit is contained in:
@@ -407,6 +407,17 @@ function getDirtyKeys(operation, newValue, oldValue) {
|
|||||||
const oldDocument = oldValue.document
|
const oldDocument = oldValue.document
|
||||||
|
|
||||||
switch (type) {
|
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': {
|
case 'insert_node': {
|
||||||
const table = node.getKeysToPathsTable()
|
const table = node.getKeysToPathsTable()
|
||||||
const parent = newDocument.assertParent(path)
|
const parent = newDocument.assertParent(path)
|
||||||
|
Reference in New Issue
Block a user