Skip to content

Commit

Permalink
If windowHashChangeHandler and we perform Util.Events.remove() then w…
Browse files Browse the repository at this point in the history
…e 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.
  • Loading branch information
poursal committed Jul 17, 2012
1 parent 53ff2df commit 5eadd45
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/photoswipe.class.js
Expand Up @@ -476,7 +476,7 @@
Util.Events.remove(window.document, 'keydown', this.keyDownHandler); 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); Util.Events.remove(window, 'hashchange', this.windowHashChangeHandler);
} }


Expand Down

0 comments on commit 5eadd45

Please sign in to comment.