Skip to content
This repository has been archived by the owner on Feb 17, 2021. It is now read-only.

Support for BeforeShowNextStep? #7

Closed
Luis-Arpasi opened this issue Jun 26, 2013 · 6 comments
Closed

Support for BeforeShowNextStep? #7

Luis-Arpasi opened this issue Jun 26, 2013 · 6 comments

Comments

@Luis-Arpasi
Copy link

Hi,

I have the scenario where i need to show a modal window before show the last step because the element for last step is in the modal window. When i try to show the window modal in onNext i got an error because the element was not found.

any solution to handle this?

@gkoo
Copy link
Contributor

gkoo commented Jun 27, 2013

Yeah, that's a pretty common use case. I'll try and get to it sometime this weekend.

@ghost ghost assigned gkoo Jun 27, 2013
@gkoo
Copy link
Contributor

gkoo commented Jul 20, 2013

Hey Luis, does your onNext callback load the contents of your modal through AJAX? "BeforeShowNextStep" is basically what "onNext" does. Just trying to figure out what your situation is.

@theSociableme
Copy link

Any updates on this?

I want "Create a Class" to be pointed at the Input box on the modal.... but since they come up together they end up like this.

image

@theSociableme
Copy link

Or somekind of timeout before displaying next..... Might fix this.

@mjpearson
Copy link

This seems like a bug... I was able to fix it by hoisting

if (doCallbacks) {
  if (direction > 0) {
    doShowFollowingStep = utils.invokeEventCallbacks('next', origStep.onNext);
  }
  else {
    doShowFollowingStep = utils.invokeEventCallbacks('prev', origStep.onPrev);
  }
}

Out of the changeStepCb closure (L1623) and into the parent changeStep function. The logic in the current version means onNext isn't called until the next steps target can be resolved. Changing the scope gives any onNext functions the opportunity to set up the DOM before trying to attach to the next target.

Can submit a pull request if this seems like an appropriate fix.

@kate2753
Copy link
Contributor

Rolling this into #56

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants