Describe the bug
The error when selecting the Code Block drop-down option is as follows:
react-dom.development.js:4312 Uncaught Error: updateEditor: selection has been lost because the previously selected nodes have been removed and selection wasn't moved to another node. Ensure selection changes after removing/replacing a selected node.
at beginUpdate (Lexical.dev.js:5791:1)
at updateEditor (Lexical.dev.js:5847:1)
at LexicalEditor.update (Lexical.dev.js:8549:1)
at formatCode (BlockFormatDropdown.tsx:88:1)
at HTMLUnknownElement.callCallback (react-dom.development.js:4164:1)
at Object.invokeGuardedCallbackDev (react-dom.development.js:4213:1)
at invokeGuardedCallback (react-dom.development.js:4277:1)
at invokeGuardedCallbackAndCatchFirstError (react-dom.development.js:4291:1)
at executeDispatch (react-dom.development.js:9041:1)
at processDispatchQueueItemsInOrder (react-dom.development.js:9073:1)
Describe the bug
The error when selecting the Code Block drop-down option is as follows:
react-dom.development.js:4312 Uncaught Error: updateEditor: selection has been lost because the previously selected nodes have been removed and selection wasn't moved to another node. Ensure selection changes after removing/replacing a selected node.
at beginUpdate (Lexical.dev.js:5791:1)
at updateEditor (Lexical.dev.js:5847:1)
at LexicalEditor.update (Lexical.dev.js:8549:1)
at formatCode (BlockFormatDropdown.tsx:88:1)
at HTMLUnknownElement.callCallback (react-dom.development.js:4164:1)
at Object.invokeGuardedCallbackDev (react-dom.development.js:4213:1)
at invokeGuardedCallback (react-dom.development.js:4277:1)
at invokeGuardedCallbackAndCatchFirstError (react-dom.development.js:4291:1)
at executeDispatch (react-dom.development.js:9041:1)
at processDispatchQueueItemsInOrder (react-dom.development.js:9073:1)