The following behavior occurs in the Embedded code editor example on the prosemirror website:
- Place cursor inside code editor
- Click somewhere inside the prosemirror content area but outside the code editor
- Observe the cursor is moved to the beginning of the code in the code editor
- Repeat step 2
- Observe the cursor appears in the place you clicked (as usual)
I would like to eliminate steps 3 & 4. Step 3 may be caused by the focus event handler in SelectionReader kicking off a chain of logic that eventually updates the selection based on the current state of the dom. Are there any suggested solutions for this?