-
Notifications
You must be signed in to change notification settings - Fork 40
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
Destroy/initiate issue #35
Comments
@outprove Thanks for reporting. I will take a look when I have some free time. |
@outprove I looked at the JSFiddle example briefly and I noticed several problems, although I don't see how any of them could cause the behavior you're experiencing:
|
It will be difficult to try to reproduce this case outside of that JSFiddle since there is so much stuff going on. If anyone can reproduce this using a unit test, that would be preferable. |
@kflorence I'm actually using a database procedure to dynamically genereate the JS/HTML based on a user-customizable questionnaire. (Hence the excessive branches/transitions for every question, I never know what I'll need in terms of complexity of dependencies ). I'll attempt to reproduce with a stripped down test. |
I simplified it, I simply used the first included example (and stripped it to the first one at that.) Here's the jsfiddle: https://jsfiddle.net/ed1rb2fr/17/ To reproduce it:
You'll see then instead of just the second step, you'll see the second step and the result shown together. This doesnt happen during the first pass of the wizard if you dont destroy it. Thanks! |
@outprove thanks for taking the time to do that, sorry I've been so busy, haven't had time to take a look yet. Perhaps I can get to it this weekend. |
@kflorence FYI, I figured out what the issue was - for some reason if you destroy and then reinstitute the wizard, the click event gets added again. I added a step in the destroy function that specifically unbinds the click event for both forward and backward: That seemed to do the trick. |
@outprove thanks for digging into it. Sorry that I haven't had time to be more responsive. It sounds like this might be something that can be patched in the code. I'll take a look when I get the chance. |
#35: Remove bound events on .destroy().
If I alternatively destroy a wizard and then initiate it, after doing so subsequent initializations cause odd behavior. Instead of showing one branch at a time, it shows n+1 branches. (So the second time it's initialized, it shows two branches for each "forward", the next time it's destroyed/initialized it shows three, etc....) Obviously something is not being reset properly in the destroy logic, but I havent yet figured out what/where it is. Any ideas?
By the way, thank you for such a useful piece of code.
ETA: Here's a jsfiddle of a subset of the page we're using, you can see the behavior by stepping through the wizard a little bit, turning off the interview (destroying the wizard) and then turning it back on , and then stepping through it again.: http://jsfiddle.net/y0w1mmkh/22/
The text was updated successfully, but these errors were encountered: