abhikmitra / ng-joyride

Angular Joyride Directive for creating custom introductions to websites
126 stars 68 forks source link

AdvanceOn event watchers remain after Skip #38

Closed hugo-azevedo closed 9 years ago

hugo-azevedo commented 9 years ago

When the "Skip" button is clicked on an element popover that has an advanceOn option set for a click event, the event click remains. So, after the curtain has disappeared and the tour has ended, if the user clicks the element registered with the advanceOn, the tour resumes without the curtain.

Is there a specific call necessary to clear all tour related event watchers? Thanks

abhikmitra commented 9 years ago

Can you provide a plunkr ?

On Tue, Aug 18, 2015 at 6:42 PM, hugo-azevedo notifications@github.com wrote:

When the "Skip" button is clicked on an element popover that has an advanceOn option set for a click event, the event click remains. So if after the curtain has disappeared and the tour has ended, if the user clicks the element registered with the advanceOn, the tour resumes without the curtain.

— Reply to this email directly or view it on GitHub https://github.com/abhikmitra/ng-joyride/issues/38.

hugo-azevedo commented 9 years ago

Here you go! http://plnkr.co/8xsZvrhEAKaIJoJVphCj

hugo-azevedo commented 9 years ago

Sorry closed it by mistake. Issue is still very much open and the plunker is in my previous post. Thanks!

abhikmitra commented 9 years ago

I released an update , please use 0.1.16 version .

hugo-azevedo commented 9 years ago

Thanks very much! I'll give it a go tomorrow!

hugo-azevedo commented 9 years ago

Hi, there! I've tested it and it does indeed unbind the advanceOn event.

However, when using angular-route, the unBindAdvanceOn function seems to unbind ALL events for that specific DOM and the routing stops working. I've updated the plunkr to show this.

If you press "Skip" at step2 (as before) then clicking on Option2 doesn't take you to Option2.html. If you cancel the tour at the title popover, you can see that Option2 works fine if the unBindAdvanceOn hasn't been run.

Thanks again!

abhikmitra commented 9 years ago

Reopening this again

hugo-azevedo commented 9 years ago

Thanks!

abhikmitra commented 9 years ago

Fixed in the latest release. Can you check and close ?

hugo-azevedo commented 9 years ago

Perfect! Thank you very much for your prompt efforts! Much obliged!

hugo-azevedo commented 9 years ago

Hi, I believe I've found a bug with the new unBindAdvanceOn() functionality.

When it is called on a title element, the error "TypeError: Cannot read property 'off' of undefined" is printed to console. As a consequence the tour cannot be restarted and the same error is printed to console every time it is tried.

Unfortunately, I reused the above plunkr for issue #39 that I submitted earlier today, but you can still reproduce the bug on this plunkr by clicking Skip on the welcome title popover. Check the browser console for the error.

Many thanks in advance and sorry for the back to back issue raising.

abhikmitra commented 9 years ago

Thanks to you for catching the bugs.Do keep on raising bugs.

I fixed it . Check and close

hugo-azevedo commented 9 years ago

Confirmed! Thanks very much!