Skip to content

Commit

Permalink
Unbinding resize events when the tour is cancelled
Browse files Browse the repository at this point in the history
I found that hitting ESC or the cancel button didn't unbind resize events, so that when I resized/zoomed the modal background would fade back in and, when clicked, would resume the tour.
  • Loading branch information
MaffooBristol committed Jan 6, 2014
1 parent 9685a1e commit 57173a0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions jquery.joyride-2.1.js
Original file line number Diff line number Diff line change
Expand Up @@ -825,6 +825,12 @@

end : function (isAborted) {
isAborted = isAborted || false;

// Unbind resize events.
if (isAborted) {
settings.$window.unbind('resize.joyride');
}

if (settings.cookieMonster) {
$.cookie(settings.cookieName, 'ridden', { expires: 365, domain: settings.cookieDomain, path: settings.cookiePath });
}
Expand Down

0 comments on commit 57173a0

Please sign in to comment.