diff --git a/packages/@ember/-internals/glimmer/lib/component-managers/input.ts b/packages/@ember/-internals/glimmer/lib/component-managers/input.ts index 1e7770362ad..22f3cf46811 100644 --- a/packages/@ember/-internals/glimmer/lib/component-managers/input.ts +++ b/packages/@ember/-internals/glimmer/lib/component-managers/input.ts @@ -18,7 +18,7 @@ const CAPABILITIES: ComponentCapabilities = { createCaller: true, dynamicScope: false, updateHook: true, - createInstance: false, + createInstance: true, }; export interface InputComponentState { diff --git a/packages/@ember/-internals/glimmer/lib/component-managers/root.ts b/packages/@ember/-internals/glimmer/lib/component-managers/root.ts index a404b10a388..635a8bef97f 100644 --- a/packages/@ember/-internals/glimmer/lib/component-managers/root.ts +++ b/packages/@ember/-internals/glimmer/lib/component-managers/root.ts @@ -83,7 +83,7 @@ export const ROOT_CAPABILITIES: ComponentCapabilities = { createCaller: true, dynamicScope: true, updateHook: true, - createInstance: false, + createInstance: true, }; export class RootComponentDefinition implements ComponentDefinition { diff --git a/packages/@ember/-internals/glimmer/lib/component-managers/template-only.ts b/packages/@ember/-internals/glimmer/lib/component-managers/template-only.ts index dd68327503b..2c6b3606f06 100644 --- a/packages/@ember/-internals/glimmer/lib/component-managers/template-only.ts +++ b/packages/@ember/-internals/glimmer/lib/component-managers/template-only.ts @@ -21,7 +21,7 @@ const CAPABILITIES: ComponentCapabilities = { createCaller: false, dynamicScope: false, updateHook: false, - createInstance: false, + createInstance: true, }; export default class TemplateOnlyComponentManager extends AbstractManager diff --git a/packages/@ember/-internals/glimmer/tests/integration/components/template-only-components-test.js b/packages/@ember/-internals/glimmer/tests/integration/components/template-only-components-test.js index 9bcb62e1dd1..f35044b16d2 100644 --- a/packages/@ember/-internals/glimmer/tests/integration/components/template-only-components-test.js +++ b/packages/@ember/-internals/glimmer/tests/integration/components/template-only-components-test.js @@ -105,6 +105,30 @@ moduleFor( this.assertInnerHTML('hello'); } + + ['@test it has the correct bounds']() { + this.registerComponent('foo-bar', 'hello'); + + this.render('outside {{#if this.isShowing}}before {{foo-bar}} after{{/if}} outside', { + isShowing: true, + }); + + this.assertInnerHTML('outside before hello after outside'); + + this.assertStableRerender(); + + runTask(() => this.context.set('isShowing', false)); + + this.assertInnerHTML('outside outside'); + + runTask(() => this.context.set('isShowing', null)); + + this.assertInnerHTML('outside outside'); + + runTask(() => this.context.set('isShowing', true)); + + this.assertInnerHTML('outside before hello after outside'); + } } );