'parentElement.appendChild' error thrown in 3.17
Unhandled Promise Rejection: TypeError: null is not an object (evaluating 'parentElement.appendChild')
With Ember 3.17.x and EBD 2.0.11 I see an error when dismissing the dropdown. This is bubbling up to EPS also.
<BasicDropdown as |dd|>
<dd.Trigger>Click me</dd.Trigger>
<dd.Content>Hello world hi</dd.Content>
</BasicDropdown>
I tried running the test suite against 3.17 with ember-try, but looks like this code path is not hit because animations are disabled in test. Same thing reproduces in 2.0.13, but I can workaround it by passing @animationsEnabled={{false}}.
The base issue is that parentElement of the dropdown does not exist by the time the animateOut function runs through the will-destroy modifier.
This may be related to the willDestroy fixes that went into 3.17.2 here https://github.com/emberjs/ember.js/pull/18837 and https://github.com/emberjs/ember.js/pull/18838, but I'm not sure how to debug further.
cc @pzuraq do you have any insight?
code refs:
- https://github.com/cibernox/ember-basic-dropdown/blob/v2.0.13/addon/templates/components/basic-dropdown-content.hbs#L18-L20
- https://github.com/cibernox/ember-basic-dropdown/blob/v2.0.13/addon/components/basic-dropdown-content.js#L174
Another problem is that @animationEnabled={{false}} does not work because when it's false, the getter will fallback to the default implementation: https://github.com/cibernox/ember-basic-dropdown/blob/v2.0.13/addon/components/basic-dropdown-content.js#L64-L67
I've submitted a fix for that here: https://github.com/cibernox/ember-basic-dropdown/pull/541
I see a related PR/Issue in EPS here: https://github.com/cibernox/ember-power-select/issues/1338
@mehulkar Did you know if (https://github.com/emberjs/ember.js/issues/18855) fix the problem?
@alex9nadon not sure. I ended up upgrading EBS /EPS to the glimmer versions to workaround this problem.
I'm running into this issue with Ember 3.19 and EBD 3.0.6. Did anyone manage to resolve this without disabling animations?
Is there a work around considering #550 ?
In Ember 3.20 we have this issue everywhere with both EBD 2.x and 3.x
Edit:
I believe our issue is that we are also running ember-power-select-typeahead which has a dependancy of ember-power-select "^3.0.3", which in turn pulls in ember-basic-dropdown "^2.0.13"
Closing this issue, as its related to older ebd versions and the mentioned were refacored in newer vesion
If this issue is still present with latest version, let me know