-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Destroyed hook not called. #339
Comments
I got the same problem here, can someone check on this ? |
Ran the repro but it seems to be working: http://jsfiddle.net/xyu276sa/217/ |
Did you checked/unchecked the checkbox multiple times while looking at the console ?. On my computed I only see 'bb' on the console instead of 'bb' (beforeDestroy) and then 'dd' (destroyed). @smartpierre Can you check my repro and see if it is working on your computer. @yyx990803 What browser are you running, If you don't see the problem must be browser related. |
@GuillaumeLeclerc I did check the checkbox and tested in Chrome, Firefox and Safari, all working as intended. |
I have the same thing as @GuillaumeLeclerc , it never shows 'dd' |
I thought my computer was going crazy. I'm glad I'm not alone having this strange problem. |
I had the chance to test it on a Windows 7. (IE 11 and Firefox 43) and I get the exact same result. I really don't understand how you can get a different result. I think the bug comes from the differences in the moment when In vue 1. _isBeingDestroyed is set here, i.e. before the call to In vue 0.12 as far as I remember _isBeingDestroyed is set in the _destroy method itself. (I can't point out where it is I'm on my phone and I can't search on github for other branches than master (it seems). If you can tell me how I can tell which version of vue it is I should be able to make a fix and unit tests for this. |
Hmm this is indeed weird. I ran the repro in IE11 & Chrome on Windows 8.1, and IE9 on Windows 7, they are all calling it correctly. Is your Vue version a bit behind? Are you using the latest 1.0.15? |
I'm using the one in the jsfiddle. Are you running the js fiddle as is ? |
Yes. I'm using this one though because your original one is not working due to rawgithub issues: http://jsfiddle.net/xyu276sa/217/ |
I tried this one http://jsfiddle.net/xyu276sa/217/ on : Firefox 43.0.4 And it only shows 'bb' in the console. I'm on Ubuntu 14.04 This is actually mind-blowing that on the same jsfiddle we have different results... |
Same here but on archlinux windows 7 and Ubuntu 14.04. I tested ie 11, chrome and Firefox |
Same here, it's very weird. If you click on "Go to Foo", check the checkbox & uncheck it, only the 'beforeDestroy' hook is called. ('bb') |
@Gomah Ohhhh I think I may have misunderstood what @GuillaumeLeclerc described. Toggling the checkbox does reproduces the issue. Looking into this. |
I thought this was clear enough : |
Thank you ! |
Hello,
I have a component (fragment) and the beforeDestroy hook is called but not the destroyed one. Is it normal or is it a bug ?
Here is a repro: http://jsfiddle.net/xyu276sa/208/
I look at the source code and it seems this part of the code has not been updated for vue 1.0. (it works fine with vue 0.12)
Thank you
The text was updated successfully, but these errors were encountered: