Widget editing does not work: «Uncaught TypeError: Cannot read property 'innerHTML' of null» (and my fix)

It is reproduced with any widget.

The problem line is:

My fix

Replace the problem line with the new one:


See also another bug: double click on a widget inside TinyMCE editor does not edit the widget but creates a new one.