From a251b12ec705eff14054ecfdbf581aadab0f2bc3 Mon Sep 17 00:00:00 2001 From: Jeff Arnold Date: Tue, 23 Apr 2013 15:59:49 -0400 Subject: [PATCH] Don't trigger two events when our app changes the hash (imported from commit c17a82b043c10927de149b105c6ceea5175b6f4f) --- zephyr/static/js/hashchange.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zephyr/static/js/hashchange.js b/zephyr/static/js/hashchange.js index 006257dfd2..d2efc39b35 100644 --- a/zephyr/static/js/hashchange.js +++ b/zephyr/static/js/hashchange.js @@ -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;