I am adding focus to a cm instance programmatically using this function
export const addFocus = (cm) => {
cm.focus();
cm.contentDOM.focus();
};
It’s an empty cm instance. So placeholder should show. But when I dig into it, view.hasFocus property is still false when adding focus to the editor programmatically.
Is there a way to refresh the editor OR force it to rerender things? I suspect a shakedown like that might be required to get it to work smoothly with programmatic changes.