Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Hash change events not working in jquerymobile after PhotoSwipe.detatch #351

Merged
merged 1 commit into from

3 participants

@poursal

If windowHashChangeHandler is null 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.

@poursal poursal 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.
5eadd45
@frequent

@mrniggles214
@poursal

You don't know how much you saved my day!

@billinghamj billinghamj merged commit 237f649 into dimsemenov:master
@thorstein5 thorstein5 referenced this pull request from a commit in thorstein5/PhotoSwipe
@thorstein5 thorstein5 Fixes build errors and removes thumbs.db files
Fixes errors reported by JSLint during build on Windows introduced in
pull request #351 and #397, and removes unnecessary Windows specific
Thumbs.db files introduced in pull request #276.
ffdf883
@thorstein5 thorstein5 referenced this pull request from a commit in thorstein5/PhotoSwipe
@thorstein5 thorstein5 Fixes build errors and removes thumbs.db files
Fixes 4 "errors" introduced in pull request #351 and #397 reported by
JSLint  - errors which causes the build script to fail, and cleans up
unnecessary Windows specific Thumbs.db files first introduced in pull
request #345.
dddba62
@thorstein5 thorstein5 referenced this pull request from a commit in thorstein5/PhotoSwipe
@thorstein5 thorstein5 Fixes build errors and removes thumbs.db files
Fixes 4 "errors" introduced in pull request #351 and #397 reported by
JSLint  - errors which causes the build script to fail, and cleans up
unnecessary Windows specific Thumbs.db files first introduced in pull
request #345.
2a112d8
@thorstein5 thorstein5 referenced this pull request from a commit in thorstein5/PhotoSwipe
@thorstein5 thorstein5 Fixes build errors and removes thumbs.db files
Fixes 4 "errors" introduced in pull request #351 and #397 reported by
JSLint  - errors which causes the build script to fail, and cleans up
unnecessary Windows specific Thumbs.db files first introduced in pull
request #345.
d0d276f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 17, 2012
  1. @poursal

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

    poursal authored
    …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.
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  src/photoswipe.class.js
View
2  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);
}
Something went wrong with that request. Please try again.