mirror of
https://github.com/facebook/lexical.git
synced 2025-08-06 16:39:33 +08:00
Improve insertBefore, insertAfter, replace selection restoration logic (#3516)
This commit is contained in:
@ -69,9 +69,12 @@ export class OverflowNode extends ElementNode {
|
||||
return false;
|
||||
}
|
||||
|
||||
insertNewAfter(selection: RangeSelection): null | LexicalNode {
|
||||
insertNewAfter(
|
||||
selection: RangeSelection,
|
||||
restoreSelection = true,
|
||||
): null | LexicalNode {
|
||||
const parent = this.getParentOrThrow();
|
||||
return parent.insertNewAfter(selection);
|
||||
return parent.insertNewAfter(selection, restoreSelection);
|
||||
}
|
||||
|
||||
excludeFromCopy(): boolean {
|
||||
|
Reference in New Issue
Block a user