When clicking, it will judge whether the cursor focused line is a read-only line, and the read-only line should not display the cursor。
When I click from a writable row to a read-only row, the focus of the cursor will flash, the following is my way of judging。
Where should I set editable to false so that the cursor will not appear first?
EditorView.domEventHandlers({
click(e, view) {
if (!isPlayBack && freezeCode) {
const isReadOnly = isInReadonlyLine(view.state);
const chain = Promise.resolve();
view.dispatch({
effects: enableAction.current.reconfigure([
EditorView.editable.of(!isReadOnly),
]),
});
});