Hi, New to prosemirror, I have setup everything as expected, but I can’t prevent editor from loosing focus programatically.
I tried to subscribe to “blur” via “handleDOMEvent”, but preventing default has no effect (logging in console works)
{
blur: (view, event) => {
console.log("blur")
if (window.confirm('Are you sure?')) {
return true
} else {
event.preventDefault()
// view.focus() (using this causes infinite confirm loop)
return true
}
},
}
Is this the way to achieve this? Is there another? Thanks!