lexical 0.37.1-nightly.20251023.0 → 0.37.1-nightly.20251027.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Lexical.dev.js +3 -3
- package/Lexical.dev.mjs +3 -3
- package/Lexical.prod.js +1 -1
- package/Lexical.prod.mjs +1 -1
- package/package.json +1 -1
package/Lexical.dev.js
CHANGED
|
@@ -7515,7 +7515,7 @@ function $internalCreateRangeSelection(lastSelection, domSelection, editor, even
|
|
|
7515
7515
|
focusDOM = domSelection.focusNode;
|
|
7516
7516
|
anchorOffset = domSelection.anchorOffset;
|
|
7517
7517
|
focusOffset = domSelection.focusOffset;
|
|
7518
|
-
if (isSelectionChange && $isRangeSelection(lastSelection) && !isSelectionWithinEditor(editor, anchorDOM, focusDOM)) {
|
|
7518
|
+
if ((isSelectionChange || eventType === undefined) && $isRangeSelection(lastSelection) && !isSelectionWithinEditor(editor, anchorDOM, focusDOM)) {
|
|
7519
7519
|
return lastSelection.clone();
|
|
7520
7520
|
}
|
|
7521
7521
|
} else {
|
|
@@ -8465,7 +8465,7 @@ function $commitPendingUpdates(editor, recoveryEditorState) {
|
|
|
8465
8465
|
// and scroll into view if needed.
|
|
8466
8466
|
if (editor._editable &&
|
|
8467
8467
|
// domSelection will be null in headless
|
|
8468
|
-
domSelection !== null && (needsUpdate || pendingSelection === null || pendingSelection.dirty) && rootElement !== null && !tags.has(SKIP_DOM_SELECTION_TAG)) {
|
|
8468
|
+
domSelection !== null && (needsUpdate || pendingSelection === null || pendingSelection.dirty || !pendingSelection.is(currentSelection)) && rootElement !== null && !tags.has(SKIP_DOM_SELECTION_TAG)) {
|
|
8469
8469
|
activeEditor = editor;
|
|
8470
8470
|
activeEditorState = pendingEditorState;
|
|
8471
8471
|
try {
|
|
@@ -10859,7 +10859,7 @@ class LexicalEditor {
|
|
|
10859
10859
|
};
|
|
10860
10860
|
}
|
|
10861
10861
|
}
|
|
10862
|
-
LexicalEditor.version = "0.37.1-nightly.
|
|
10862
|
+
LexicalEditor.version = "0.37.1-nightly.20251027.0+dev.cjs";
|
|
10863
10863
|
|
|
10864
10864
|
let pendingNodeToClone = null;
|
|
10865
10865
|
function setPendingNodeToClone(pendingNode) {
|
package/Lexical.dev.mjs
CHANGED
|
@@ -7513,7 +7513,7 @@ function $internalCreateRangeSelection(lastSelection, domSelection, editor, even
|
|
|
7513
7513
|
focusDOM = domSelection.focusNode;
|
|
7514
7514
|
anchorOffset = domSelection.anchorOffset;
|
|
7515
7515
|
focusOffset = domSelection.focusOffset;
|
|
7516
|
-
if (isSelectionChange && $isRangeSelection(lastSelection) && !isSelectionWithinEditor(editor, anchorDOM, focusDOM)) {
|
|
7516
|
+
if ((isSelectionChange || eventType === undefined) && $isRangeSelection(lastSelection) && !isSelectionWithinEditor(editor, anchorDOM, focusDOM)) {
|
|
7517
7517
|
return lastSelection.clone();
|
|
7518
7518
|
}
|
|
7519
7519
|
} else {
|
|
@@ -8463,7 +8463,7 @@ function $commitPendingUpdates(editor, recoveryEditorState) {
|
|
|
8463
8463
|
// and scroll into view if needed.
|
|
8464
8464
|
if (editor._editable &&
|
|
8465
8465
|
// domSelection will be null in headless
|
|
8466
|
-
domSelection !== null && (needsUpdate || pendingSelection === null || pendingSelection.dirty) && rootElement !== null && !tags.has(SKIP_DOM_SELECTION_TAG)) {
|
|
8466
|
+
domSelection !== null && (needsUpdate || pendingSelection === null || pendingSelection.dirty || !pendingSelection.is(currentSelection)) && rootElement !== null && !tags.has(SKIP_DOM_SELECTION_TAG)) {
|
|
8467
8467
|
activeEditor = editor;
|
|
8468
8468
|
activeEditorState = pendingEditorState;
|
|
8469
8469
|
try {
|
|
@@ -10857,7 +10857,7 @@ class LexicalEditor {
|
|
|
10857
10857
|
};
|
|
10858
10858
|
}
|
|
10859
10859
|
}
|
|
10860
|
-
LexicalEditor.version = "0.37.1-nightly.
|
|
10860
|
+
LexicalEditor.version = "0.37.1-nightly.20251027.0+dev.esm";
|
|
10861
10861
|
|
|
10862
10862
|
let pendingNodeToClone = null;
|
|
10863
10863
|
function setPendingNodeToClone(pendingNode) {
|