From 57173a01a0bb9a9e8bd4dcba7b8853385077ba6a Mon Sep 17 00:00:00 2001 From: Matt Fletcher Date: Mon, 6 Jan 2014 11:20:32 +0000 Subject: [PATCH] Unbinding resize events when the tour is cancelled 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. --- jquery.joyride-2.1.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/jquery.joyride-2.1.js b/jquery.joyride-2.1.js index 604edc6..72fb38d 100755 --- a/jquery.joyride-2.1.js +++ b/jquery.joyride-2.1.js @@ -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 }); }