1
0
Fork 0
mirror of https://github.com/TryGhost/Ghost-Admin.git synced 2023-12-14 02:33:04 +01: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 2a16e2ec26
commit 44409b5467

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);