Don't trigger two events when our app changes the hash

(imported from commit c17a82b043c10927de149b105c6ceea5175b6f4f)
This commit is contained in:
Jeff Arnold
2013-04-23 15:59:49 -04:00
parent 0b9e509f41
commit a251b12ec7

View File

@@ -83,6 +83,8 @@ function do_hashchange() {
return false;
}
$(document).trigger($.Event('hashchange.zephyr'));
// NB: In Firefox, window.location.hash is URI-decoded.
// Even if the URL bar says #%41%42%43%44, the value here will
// be #ABCD.
@@ -111,7 +113,6 @@ function do_hashchange() {
function hashchanged() {
changing_hash = true;
$(document).trigger($.Event('hashchange.zephyr'));
var ret = do_hashchange();
changing_hash = false;
return ret;