Skip to content

Commit

Permalink
fbobjc/Libraries/Lexical
Browse files Browse the repository at this point in the history
Reviewed By: wasdkhan

Differential Revision: D54244276

fbshipit-source-id: e11e8c2304167c76eb6714ed066bdcc0f142990c
  • Loading branch information
generatedunixname89002005287564 authored and facebook-github-bot committed Feb 27, 2024
1 parent c4f1a33 commit 64ecbbd
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Lexical/Core/Editor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -678,23 +678,22 @@ public class Editor: NSObject {
pendingEditorState.selection = nil
}
}

editorState = pendingEditorState
self.pendingEditorState = nil
dirtyNodes.removeAll()
dirtyType = .noDirtyNodes
cloneNotNeeded.removeAll()

mountDecoratorSubviewsIfNecessary()
}

// These have to be outside of the above runWithStateLexicalScopeProperties{} closure, because: if any update block is triggered from inside that
// closure, it counts as a nested update. But listeners, which happen after we've run the reconciler, should not count as nested for this purpose;
// if an update is triggered from within an update listener, it needs to run the reconciler a second time.
triggerUpdateListeners(activeEditor: self, activeEditorState: editorState, previousEditorState: previousEditorStateForListeners, dirtyNodes: dirtyNodesForListeners)
try triggerTextContentListeners(activeEditor: self, activeEditorState: editorState, previousEditorState: previousEditorStateForListeners)


frontend?.isUpdatingNativeSelection = false

if featureFlags.reconcilerSanityCheck && !mode.suppressSanityCheck && compositionKey == nil, let frontend {
Expand Down

0 comments on commit 64ecbbd

Please sign in to comment.