0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00

Fix broken editor when content contains wrapped images

no issue
- don't assume that the upload element that is being replaced is top-level, target the element's parentNode rather than the overall fragment
This commit is contained in:
Kevin Ansfield 2016-05-18 21:52:07 +01:00
parent e35e037c1a
commit d19dd52cf6

View file

@ -92,7 +92,7 @@ export default Component.extend({
el.innerHTML = '';
el.classList.remove('image-uploader');
fragment.replaceChild(el, oldEl);
oldEl.parentNode.replaceChild(el, oldEl);
});
this.set('previewHTML', fragment);