question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ember-wormhole failed to render into '#ember-basic-dropdown-wormhole' because the element is not in the DOM

See original GitHub issue

When I try to add a dropdown to my application I get this error

ember-wormhole failed to render into '#ember-basic-dropdown-wormhole' because the element is not in the DOM

I am on ember-power-select 0.5.2 and ember 1.13.11

is it expected <div id="ember-basic-dropdown-wormhole"></div> is added by us to the body (that didnt seem to work) or the addon? should I add ember-wormhole as a dependency to my application?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:26 (12 by maintainers)

github_iconTop GitHub Comments

6reactions
jackmatt2commented, Jan 10, 2016

@cibernox this is now fixed using your suggestion.

     contentFor: function(type, config) {
            if (type === 'body-footer') {
              var emberBasicDropdown = this.addons.filter(function(addon) {
                return addon.name === 'ember-power-select';
              })[0];
              return emberBasicDropdown.contentFor(type, config);
            } else {
              return '';
            }
        }

1reaction
cibernoxcommented, Jan 8, 2016

@jackmatt2 so, you are building an addon that depends in ember-power-select, and in the final app you install only your addon, correct?

If that is so, I know why is failing.

ember-basic-dropdown (used internally by ember-power-select) uses the contentFor hook for adding the placeholder div. But because of the way ember-cli works (and I think that it is intended), only the hooks of the direct dependencies of your app are run. That is why ember-power-select has to define the contentFor hook and call the contentFor of ember-basic-dropdown explicitly: https://github.com/cibernox/ember-power-select/blob/master/index.js#L23-L28

If your addon includes ember-power-select, you need to do the same and define the contentFor hook and in there, search among the addons for ember-power-select and invoke its contentFor.

Then, the chain will be your-addon —> power-select --> basic-dropdown

Read more comments on GitHub >

github_iconTop Results From Across the Web

ember-wormhole failed to render into '#ember-basic ...
ember -wormhole failed to render into '#ember-basic-dropdown-wormhole' because the element is not in the DOM.
Read more >
Cannot locate any parts of the body of an element with ...
I have tried scrolling to the middle of the page in case its hidden, finding out what is in each of the 3...
Read more >
ember-basic-dropdown | Yarn - Package Manager
0.24.0. [BREAKING] It is a problem for a11y to have aria-owns/controls to an element that it's not in the DOM, so now there...
Read more >
ember-basic-dropdown - UNPKG
The CDN for ember-basic-dropdown. ... error message that. 94, appeared when there was no element with id `ember-basic-dropdown-wormhole` in the document.
Read more >
The State of the Ember Addon Ecosystem in 2019 - Salsify
Ember addons generally fall into one (or more) category of functionality I'll be ... ember-basic-dropdown └── ember-wormhole@0.5.1.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found