Form fields embedded inside a NodeView cannot be focused when `editable` is `false` on the EditorView

I’m rendering a NodeView with a form inside.

While EditorView is in editable state, everything works correctly. But when I set editable: () => false on the EditorView, all the form fields start to lose focus immediately after gaining it. That is, the form still registers events (e.g. if you click or Tab into a form field it correctly opens if it is a select or gets checked if it is a checkbox etc.) but then the field immediately loses focus, so it becomes impossible to type anything into inputs or textareas.

My use case is to have several forms like this embedded in-between the free-form text, and depending on the user role either allow both to edit the free form text and to fill-in forms (which works correctly) or allow the user to only fill-in forms without being able to edit the free-form text (to achieve this I’m setting edtiable to false, but then the fields start losing focus).

It turns out that this was a problem with the older version of ProseMirror. I was on the 1.7 version of prosemirror-view, after bumping it to 1.13 the problem disappeared. Sorry for a false alarm :pray:

Always great when issues work themselves out on their own :grin:

Not exactly on their own, coz this was a legitimate bug that was fixed in prosemirror-view 1.9.13. It just happens that you have fixed it even before I have found it :wink:

A maintainer pre-emptively solving your problems 4 months before you even have them - that’s how an Open Source project should be run! :exploding_head: :wink:

Thanks @marijn! :bowing_man: