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

'parentElement.appendChild' error thrown in 3.17 #540

Closed
mehulkar opened this issue Mar 31, 2020 · 10 comments
Closed

'parentElement.appendChild' error thrown in 3.17 #540

mehulkar opened this issue Mar 31, 2020 · 10 comments

Comments

@mehulkar
Copy link

mehulkar commented Mar 31, 2020

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>
@mehulkar
Copy link
Author

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 emberjs/ember.js#18837 and emberjs/ember.js#18838, but I'm not sure how to debug further.

cc @pzuraq do you have any insight?

@mehulkar
Copy link
Author

mehulkar commented Mar 31, 2020

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: #541

@mehulkar
Copy link
Author

I see a related PR/Issue in EPS here: cibernox/ember-power-select#1338

@alex9nadon
Copy link

@mehulkar Did you know if (emberjs/ember.js#18855) fix the problem?

@mehulkar
Copy link
Author

mehulkar commented May 6, 2020

@alex9nadon not sure. I ended up upgrading EBS /EPS to the glimmer versions to workaround this problem.

@adambedford
Copy link

adambedford commented Jul 4, 2020

I'm running into this issue with Ember 3.19 and EBD 3.0.6. Did anyone manage to resolve this without disabling animations?

@k-dauda
Copy link

k-dauda commented Aug 11, 2020

Is there a work around considering #550 ?

@edflips
Copy link

edflips commented Aug 16, 2020

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"

@mkszepp
Copy link
Collaborator

mkszepp commented Mar 16, 2024

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

@mkszepp mkszepp closed this as not planned Won't fix, can't repro, duplicate, stale Mar 16, 2024
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

6 participants