Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In testing, "Failed to execute 'removeChild' on 'Node'" error occurs #47

Open
ykaragol opened this issue May 23, 2017 · 5 comments
Open

Comments

@ykaragol
Copy link

ykaragol commented May 23, 2017

There is a condition in a template (as shown in readme):

{{#if isShowing}}
  {{#ember-tether
      target='#a-nice-person'
      targetAttachment='top left'
      attachment='bottom left'
  }}
   <div id="my-puppy">
    A puppy
   </div>
  {{/ember-tether}}
{{/if}}

When the isShowing turned from true to false, it gives an error in tests.

It works perfect in an application but it fails in integration tests with the following error:

Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.

You can see its in the twiddle

I found a nearly same issue in ember-wormhole: yapplabs/ember-wormhole#66. But the workaround didn't worked for this issue.

@Baskerville42
Copy link

I have the same issue

@jacojoubert
Copy link

jacojoubert commented Jun 28, 2017

Getting this in my application as well (not in tests). Happens when the div containing the tether component has a position: relative set to it.

@chrislopresto
Copy link
Contributor

@ykaragol Thanks for the twiddle. A similar workaround to the one mentioned in yapplabs/ember-wormhole#66 seems to do the trick:

{{#if isShowing}}
  <div>
    {{#ember-tether
        target='#a-nice-person'
        targetAttachment='top left'
        attachment='bottom left'
    }}
     <div id="my-puppy">
      A puppy
     </div>
    {{/ember-tether}}
  </div>
{{/if}}

You can see it in action in my fork of the twiddle

@Baskerville42 @jacojoubert @ykaragol does that work for you? We should PR the README regardless.

@ykaragol
Copy link
Author

Yeap, it seems it is working.

@samselikoff
Copy link

Bizarrely, I'm running into the same symptom @jacojoubert. Removing position: relative on the parent fixes it, but I have no idea why.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants