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

Paper select errors when menu is closed on ember > 3.17 #1166

Closed
LucasHill opened this issue Sep 22, 2020 · 3 comments · Fixed by #1201
Closed

Paper select errors when menu is closed on ember > 3.17 #1166

LucasHill opened this issue Sep 22, 2020 · 3 comments · Fixed by #1201

Comments

@LucasHill
Copy link

When you open a <PaperSelect ... /> and then close the menu, you'll see this error show up in the console.

component.js:65 Uncaught (in promise) TypeError: Cannot read property 'appendChild' of null at PaperMenuContent.animateOut (component.js:65) at Object.destroyModifier (will-destroy.js:68) at CustomModifierState.destroy (index.js:6906) at StringDestroyableDestructor.[DID_DROP] (util.js:290) at util.js:201 at Set.forEach (<anonymous>) at didDestroyAssociated (util.js:200) at SimpleDestructor.[DID_DROP] (util.js:314) at util.js:201 at Set.forEach (<anonymous>)

The issue is from ember-power-select and you can see the relevant issues at:
cibernox/ember-power-select#1338 (fixed here)
cibernox/ember-basic-dropdown#540

The fix was released in ember-power-select 4.0.

I was able to verify the issues goes away by forcing ember-power-select to resolve to 4.0.4.

I see that ember-power-select requires ember 3.13 which is a year old, but this seems worth it as we would be totally blocked from upgrading without forcing the resolution.

@hergaiety
Copy link

hergaiety commented Sep 23, 2020

Can confirm we're seeing this too trying to upgrade to Ember 3.17.x

        stack: >
            TypeError: Cannot read property 'appendChild' of null
                at PaperSelectEbdContent._callee$ (http://localhost:7357/assets/vendor.js:209457:33)
                at tryCatch (http://localhost:7357/assets/vendor.js:5014:40)
                at Generator.invoke [as _invoke] (http://localhost:7357/assets/vendor.js:5288:22)
                at Generator.prototype.<computed> [as next] (http://localhost:7357/assets/vendor.js:5047:21)
                at asyncGeneratorStep (http://localhost:7357/assets/vendor.js:209370:105)
                at _next (http://localhost:7357/assets/vendor.js:209372:196)
                at http://localhost:7357/assets/vendor.js:209372:366
                at new Promise (<anonymous>)
                at PaperSelectEbdContent.<anonymous> (http://localhost:7357/assets/vendor.js:209372:99)
                at PaperSelectEbdContent.animateOut (http://localhost:7357/assets/vendor.js:209483:30)
        message: >
            Cannot read property 'appendChild' of null

This traces back to ember-paper in the way described in LucasHill's original Issue report.

@LucasHill
Copy link
Author

After I upgraded to 3.18 I started having the issue again. I realized it was addressed partially in the 1.0.0-beta33 release here:
https://github.com/miguelcobain/ember-paper/blob/master/addon/components/paper-menu/content/component.js#L62

The problem is, in the test container the ember-basic-dropdown-wormhole does not exist. See: cibernox/ember-basic-dropdown#411

So while beta 33 fixed the issue when I'm running the app, the error still exists when I'm running tests. Do we need to make a test specific condition for what element it selects?

@hergaiety
Copy link

#1117 is related work and the broader initiative to bring this addon up to speed with 3.16.x

gkappen added a commit to NIPOSoftwareBV/ember-paper that referenced this issue Mar 5, 2021
backspace added a commit to backspace/prison-rideshare-ui that referenced this issue Sep 27, 2023
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

Successfully merging a pull request may close this issue.

2 participants