Determine whether to focus the cursor

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?

    click(e, view) {
      if (!isPlayBack && freezeCode) {

        const isReadOnly = isInReadonlyLine(view.state);
        const chain = Promise.resolve();
            effects: enableAction.current.reconfigure([


mousedown is dispatched before click, so if you don’t want the effect of that to happen, define a mousedown handler.

thank you for your reply