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

Clones are not torn down in Ember 2.3.2 #11

Closed
mellatone opened this issue Apr 12, 2016 · 13 comments
Closed

Clones are not torn down in Ember 2.3.2 #11

mellatone opened this issue Apr 12, 2016 · 13 comments

Comments

@mellatone
Copy link

When using either the mixin or the component version, the teardown removes the component but not the DOM clone, leaving a copy behind each time something like a toggle happens.

@mellatone
Copy link
Author

image

@miguelcobain
Copy link
Owner

I released now 0.1.5.
The strategy has changed and we shouldn't have these kind of problems anymore. See #15

@fedekau
Copy link

fedekau commented Nov 23, 2016

@miguelcobain This is still happening I am using ember-paper with the last alpha version and it still happening with the paper-dialog component, I have tried to find where/how the problem originates but I haven't yet, do you have any idea where it could be? If you give me a hint maybe I could help you solve that!

@fedekau
Copy link

fedekau commented Nov 23, 2016

I think I found the problem, ember-wormhole uses two text nodes to identify what elements to delete, but the cloned element is inserted outside those elements created by the wormhole addon and that might be why they are not being deleted, just an hypothesis I need to prove it now! 🤓

@fedekau
Copy link

fedekau commented Nov 23, 2016

This is what happens now, the last element is the cloned one, but it should not be! The last element should be the text node in position 7 which was created by the wormhole, and that is the problem (I hope)

screen shot 2016-11-23 at 8 25 39 pm

I don't know who's concern should be this problem, if from this addon or the wormhole addon 🤔 , what do you think?

@miguelcobain
Copy link
Owner

@fedekau does this happen in all browsers?

@fedekau
Copy link

fedekau commented Nov 24, 2016

@miguelcobain It happens on Chrome and Firefox, in Safari I couldn't reproduce the problem. I am using the last stable version of each browser.

@miguelcobain
Copy link
Owner

@fedekau Very strange. This test is passing on Chrome for me: https://github.com/peec/ember-css-transitions/blob/master/tests/integration/components/transition-group-test.js#L48

Do you see that bug in latest ember-paper's docs?

@fedekau
Copy link

fedekau commented Nov 24, 2016

@miguelcobain It don't see the bug there, I will try to update an example where it fails so you can see it! Thanks for the time :)

@miguelcobain
Copy link
Owner

A failing test or some way of reproducing the bug would help immensely.

@fedekau
Copy link

fedekau commented Nov 24, 2016

@miguelcobain I took a look at the problem again and I am not sure if what I previously said is valid (about the clone not being deleted), anyway here is an example app ember-css-transitions-bug

To reproduce it:

  1. Click the more_vert icon ( three dots)
  2. Click the link Route 1
  3. Navigate back with the browser back arrow (this should not reload the app, if it does you will not see the error)
  4. Navigate forward with the browser arrow
  5. Repeat from 3

This will add an element to the document every time you do the steps 3 & 4

Let me know if you can see the problem, and if you need help to fix it!

@miguelcobain
Copy link
Owner

@fedekau The problem isn't in ember-css-transitions.
Ember-paper has it's own mixin for 3d translation on dialogs.
In that mixin we do our own cloning and destruction logic, like in ember-css-transitions.

ember-css-transitions once had this problem, but then I fixed it in #15.
We need to do the same thing in ember-paper's translate3d mixin.

In fact, I kept note that this bug might happen in adopted-ember-addons/ember-paper#249:

don't use transitionend events for animation. Figure out a way to reuse ember-css-transitions "wait for animations" logic.

tl;dr transitionend events are useless and buggy.

@fedekau
Copy link

fedekau commented Nov 25, 2016

Thanks for taking the time to explain that @miguelcobain!

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

3 participants