LinkedInAttic / hopscotch

A framework to make it easy for developers to add product tours to their pages.
Apache License 2.0
4.19k stars 664 forks source link

Event listeners not working #297

Open RomeroDiver opened 8 years ago

RomeroDiver commented 8 years ago

Hi, there is this small bug that I found - when you add a e.g. show callback to a step, and then define a tour onShow callback or add show event to hopscotch, those callbacks won't be called. I found out that the reason for this is invokeEventCallbacks private method:

if (stepCb) {
    return this.invokeCallback(stepCb);
 }

Basically, if step has a callback, then return the result of that callback and don't go further - and further we have the for loop calling other callbacks(e.g. from events or tour's callback).

Am I right here or am I missing something?