diff --git a/VEditorKit/Classes/VEditorNode.swift b/VEditorKit/Classes/VEditorNode.swift index e0cafd4..778822d 100644 --- a/VEditorKit/Classes/VEditorNode.swift +++ b/VEditorKit/Classes/VEditorNode.swift @@ -847,7 +847,9 @@ extension VEditorNode { private func deleteUnnecessaryEditableTextIfNeeds(with: UITableView.RowAnimation = .automatic) { guard let indexPath = self.activeTextIndexPath, - self.editorContents.count > 1 else { return } + self.editorContents.count > 1, + indexPath.row != self.editorContents.count - 1 else { return } + self.resignActiveTextNode() self.editorContents.remove(at: indexPath.row) self.tableNode.deleteRows(at: [indexPath], with: with)