GetmeUK / ContentTools

A JS library for building WYSIWYG editors for HTML content.
http://getcontenttools.com
MIT License
3.95k stars 395 forks source link

Error when saving empty fixtures #444

Closed anthonyjb closed 6 years ago

anthonyjb commented 6 years ago

(Originally reported here https://github.com/GetmeUK/ContentEdit/issues/24 by @capr)

When removing the text from a fixture and then saving, I get this error:

Uncaught TypeError: Failed to execute 'replaceChild' on 'Node': parameter 1 is not of type 'Node'. at _EditorApp.save (content-tools.js:8632) at _EditorApp.stop (content-tools.js:8682) at IgnitionUI. (content-tools.js:8309) at IgnitionUI.ContentTools.ComponentUI.ComponentUI.dispatchEvent (content-tools.js:5768) at IgnitionUI.ContentTools.IgnitionUI.IgnitionUI.confirm (content-tools.js:6024) at HTMLDivElement. (content-tools.js:6092)

You can test with the sandbox (eg. try deleting the text from the h1 tag and then saving).