In the codesandbox linked below, the editor is focused on mount when the initialConfig editorState converts a markdown heading and registerNodeTransform has been used. Is this expected?
Lexical version: 0.10.0
Steps To Reproduce
- Open the codesandbox below
- Observe that the editor is initially focused (cursor is visible)
- Change
value to test (uncomment line 27)
- Reload the browser preview, observe that the editor is not focused (cursor is not visible)
- Change
value back to # test and comment out <TestPlugin />
- Reload the browser preview, observe that the editor is not focused (cursor is not visible)
Link to code example:
https://codesandbox.io/s/lexical-editor-focused-after-node-transform-sfm1wn?file=/src/Editor.js
The current behavior
On reloading the browser preview, the editor is initially focused (cursor is visible).
The expected behavior
I expect the editor not to be initially focused unless using @lexical/react/LexicalAutoFocusPlugin?