Recently, editing widgets in the WYSIWYG editor does not work anymore.
The browser console shows the following error when I click on a widget:
Uncaught DOMException: Failed to execute 'setBaseAndExtent' on 'Selection': There is no child at offset 1.
at Editor.<anonymous> (http://example.com/js/tiny_mce/tiny_mce.js:1:15327)
at Dispatcher.dispatch (http://example.com/js/tiny_mce/tiny_mce.js:1:6000)
at DOMUtils.c (http://example.com/js/tiny_mce/tiny_mce.js:1:184650)
at j (http://example.com/js/tiny_mce/tiny_mce.js:1:58627)
at HTMLDocument.y (http://example.com/js/tiny_mce/tiny_mce.js:1:58785)
(anonymous) @ tiny_mce.js:1
dispatch @ tiny_mce.js:1
c @ tiny_mce.js:1
j @ tiny_mce.js:1
y @ tiny_mce.js:1
tiny_mce.js:1 Uncaught DOMException: Failed to execute 'setBaseAndExtent' on 'Selection': There is no child at offset 1.
at Editor.<anonymous> (http://example.com/js/tiny_mce/tiny_mce.js:1:15327)
at Dispatcher.dispatch (http://example.com/js/tiny_mce/tiny_mce.js:1:6000)
at DOMUtils.c (http://example.com/js/tiny_mce/tiny_mce.js:1:184650)
at j (http://example.com/js/tiny_mce/tiny_mce.js:1:58627)
at HTMLDocument.y (http://example.com/js/tiny_mce/tiny_mce.js:1:58785)
And the popup to create a new widget appears, instead of the one to edit the existing widget.
I found the behavior on different versions of Magento CE 1.x and EE 1.x, in Chrome, regardless of the OS. Can it be related to the recent security patch SUPEE-9767?
Best Answer
Apparently it is not related to the patch, but to the latest Chrome update (Chrome 58) which got rolled out around the same time. TinyMCE uses deprecated features that were removed in that version.
Magento 2.0 and 2.1 are affected as well (see: https://github.com/magento/magento2/issues/9518)
It seems to be a problem with images in general, here's a related issue in the TinyMCE project: https://github.com/tinymce/tinymce/issues/3611 TinyMCE 4.6 fixes the issue.
Now you have the following options: