Textarea in widget (locked leaf type)

I’m looking at refactoring our widgets. Now they are overlays with absolute positioning, but putting them in the PM content flow will simplify things.

But when a widget has a textarea or input, I can’t focus and type there. The text goes to the previous PM position, even though the textarea has focus.

Noticed the same issue with @peteb’s widgets:

You are right. For my application that isn’t a problem because my editor is being used to build HTML content not data entry. Another issue I found in FF is that you sometimes get a NS_ERROR_FAILURE. It doesn’t affect anything and apparently has something to do with focus in FF.

That also made me wonder if text entered in input fields is even tracked by PM.

@marijn ideally I could give the widget container schema a property to specify “I’m responsible for the DOM in here.”

With this patch the editor won’t interpret key (and composition/input) events when it isn’t focused. That should address this problem.

Still seems to be some issues when triple-click selecting text in an input. Also any selection of text in an iframe widget.