diff --git a/plugins/c9.ide.ui/forms.js b/plugins/c9.ide.ui/forms.js index 0ab3e6f8..400e7148 100644 --- a/plugins/c9.ide.ui/forms.js +++ b/plugins/c9.ide.ui/forms.js @@ -499,8 +499,8 @@ define(function(require, exports, module) { htmlNode = htmlNode.$int; } // if we have apf node, make sure apf child-parent links do not get broken - if (htmlNode.host && container.host) { - htmlNode.host.insertBefore(container.host, beforeNode && beforeNode.host); + if (htmlNode.host) { + htmlNode.host.insertBefore(container, beforeNode && beforeNode.host); } else { htmlNode.insertBefore(container.$ext, beforeNode || null); }