Closed calvinps closed 3 years ago
I just ran into this same problem.
It seems that will-destroy
modifier isn't including parentElement to the element and it could be related to this issue
Adding this prevents the error:
if (! parentElement) {
parentElement = document.getElementById('ember-basic-dropdown-wormhole');
}
I don't know if it's worth a PR
@miguelcobain the fix @MarcoUmpierrez suggested actually works, seems a bit "hacky", but as the discussion in https://github.com/emberjs/ember.js/issues/18795 is still not resolved. What do you think?
The 'hacky' option here has allowed me to get our app to 3.20. I'll be referencing this commit directly until we find a better solution: https://github.com/teamtopia/ember-paper/commit/abfdf1441a092e9d9a10a729397a8db3eb529054
@chbonser do you mind creating a PR with your workaround? I don't see a good way to solve this.
I'll post one this afternoon.
On Tue, Sep 1, 2020 at 9:56 AM Miguel Andrade notifications@github.com wrote:
@chbonser https://github.com/chbonser do you mind creating a PR with your workaround? I don't see a good way to solve this.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/miguelcobain/ember-paper/issues/1151#issuecomment-684915979, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHZU5WFMRL5DKIYRNYWBULSDUDSZANCNFSM4NMQNDOQ .
I added the work around. Should be in the next release. Thanks everyone for reporting!
Please try 1.0.0-beta.32
and reopen if issue persists.
This fix prevent the error in the console but it doesn't fix the problem of the menu appearing magically from the left side of the screen the second time you click on it. To fix it is necessary to specify the parent, that's why I added the line that looks for ember-basic-dropdown-wormhole
.
I have a component that renders a PaperMenu component. After running an integration test for my component in which I render the PaperMenu component and click on the trigger, my test suite fails. The source of the issue is that the
animateOut
function in PaperMenu::Content the element doesn't have a "parentElement" and the function crashes at the end of the test. I've tried unsuccessfully to find a way to destroy the PaperMenu gracefully.Ember version: 3.18 Ember Paper version: 1.0.0-beta.30
My component:
My test:
A quick fix would be to simply return early in the
animateOut
if a parentElement isn't found on the givenelement