ember-tether
ember-tether copied to clipboard
Breaks with glimmer (ember 2.10.0) when you don't have a single child element
I have a ember-tether
inside an {{#if}}
that contains a {{link-to}}
. The following breaks:
- make the
if
evaluate totrue
- click the
{{link-to}}
- make the
if
evaluate tofalse
I get this error:
Uncaught NotFoundError: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
I have the problem too, if I can get a pointer where to look, I can help. Any ideas where to start?
Okay, I think its far simpler. If the tether is inside an {{#if}}
it breaks :/
Workaround for now:
Replace this:
{{#if show}}
{{#ember-tether ...}}...{{/ember-tether}}
{{/if}}
with this:
{{#if show}}
<div>
{{#ember-tether ...}}...{{/ember-tether}}
</div>
{{/if}}
Thanks to this post.
I believe this issue might be solvable using the -in-element
helper, which we're using over in ember-popper. It allows you to tell Glimmer to render the block to the target element, so you can render it directly to wherever the Tether would have been appended (body, #ember-application
, etc) and Tether won't end up actually moving the element, so Glimmer will know how to remove it later.
@pzuraq is your suggestion that the -in-element
helper be used without Tether, or can you see them being used in parallel? I am a bit unsure as to how I might go about this.