2.0.0-rc.1, 2.0.0-rc.3
http://codepen.io/analog-nico/pen/KrJgqN
this.errorAgreement = false was set and thus the DOM element for the error message gets removed. All DOM elements below the error message get reinserted.self.$router.push({ path: '/done' }) is executed and - i guess - starts to destroy the page in order to navigate to the second one.Still occurs with vue 2.0.0-rc.3 and vue-router 2.0.0-rc.3: http://codepen.io/analog-nico/pen/yJmNYy
I've removed irrelevant code in your repro (and please please do this yourself next time), the bug appears no more.
http://codepen.io/fnlctrl/pen/pbrpEO
So I guess there's something wrong in your code, please do the debug yourself.
@fnlctrl The new codepen is not suitable to reproduce the issue. The "irrelevant code" had a purpose.
We are talking about a race condition. The bug only appears if your view reaches a certain size and thus vue needs more time to rerender it. Only then vue-router executes the .push(...) _while_ vue is still not done and produces the crash. See the "What is actually happening?" section. I wrote it based on debugging the internal code.
Please reopen the issue. IMHO it is a major flaw of the interoperability of both libraries.
It's not really a race condition, because even if you make the timeout 1000ms the same error still happens (even before the timer fires).
In fact it's another vdom patching related bug which has been fixed in Vue.js core (will be out in rc.4)
Makes sense to me. Thank you @yyx990803 !
@analog-nico Sorry for the close!
@fnlctrl No problem! Weeding out the usage issues is important to keep the workload manageable. Especially for a project with this much attention. Btw, I am happy to see that you are part of a healthy core maintainer group of the library I so much love and depend on. Thank you!
Thanks! I just verified it with [email protected] and [email protected] and it works.
Most helpful comment
@fnlctrl No problem! Weeding out the usage issues is important to keep the workload manageable. Especially for a project with this much attention. Btw, I am happy to see that you are part of a healthy core maintainer group of the library I so much love and depend on. Thank you!