From 5eadd455f593e8e5248e1320eee17982aa1c71e8 Mon Sep 17 00:00:00 2001 From: poursal Date: Tue, 17 Jul 2012 09:30:43 +0300 Subject: [PATCH] If windowHashChangeHandler and we perform Util.Events.remove() then we remove all event handlers from the 'hashchange' event. This means that jquerymobile will not be able to handle history.back() and you will remain in the same page. --- src/photoswipe.class.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/photoswipe.class.js b/src/photoswipe.class.js index d8b0e9982..2d96406d6 100644 --- a/src/photoswipe.class.js +++ b/src/photoswipe.class.js @@ -476,7 +476,7 @@ Util.Events.remove(window.document, 'keydown', this.keyDownHandler); } - if (this.isBackEventSupported && this.settings.backButtonHideEnabled){ + if (this.isBackEventSupported && this.settings.backButtonHideEnabled && this.windowHashChangeHandler!=null){ Util.Events.remove(window, 'hashchange', this.windowHashChangeHandler); }