Permalink
Browse files

If windowHashChangeHandler and we perform Util.Events.remove() then w…

…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...
1 parent 53ff2df commit 5eadd455f593e8e5248e1320eee17982aa1c71e8 @poursal poursal committed Jul 17, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/photoswipe.class.js
View
@@ -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);
}

0 comments on commit 5eadd45

Please sign in to comment.