mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-17 20:51:20 +02:00
Fix newText condition (#1838)
This commit is contained in:
committed by
Ian Storm Taylor
parent
57138de130
commit
ec2b17c2d6
@@ -171,7 +171,7 @@ Changes.insertFragment = (change, fragment) => {
|
|||||||
const newTexts = document.getTexts().filter(n => !keys.includes(n.key))
|
const newTexts = document.getTexts().filter(n => !keys.includes(n.key))
|
||||||
const newText = isAppending ? newTexts.last() : newTexts.takeLast(2).first()
|
const newText = isAppending ? newTexts.last() : newTexts.takeLast(2).first()
|
||||||
|
|
||||||
if ((newText && lastInline) || isInserting) {
|
if (newText && (lastInline || isInserting)) {
|
||||||
change.select(selection.collapseToEndOf(newText))
|
change.select(selection.collapseToEndOf(newText))
|
||||||
} else if (newText) {
|
} else if (newText) {
|
||||||
change.select(
|
change.select(
|
||||||
|
Reference in New Issue
Block a user