diff options
author | Guy Pyrzak <guy.pyrzak@gmail.com> | 2010-12-03 01:08:17 +0100 |
---|---|---|
committer | Guy Pyrzak <guy.pyrzak@gmail.com> | 2010-12-03 01:08:17 +0100 |
commit | 4c2a23f4df1041fe21d534b38654a0d1c911282e (patch) | |
tree | 10edc1251d29b2143ce70cd44aba292b8e473d3c /template/en/default | |
parent | 69267565979d7a030f8fbad94da2a3295473813e (diff) | |
download | bugzilla-4c2a23f4df1041fe21d534b38654a0d1c911282e.tar.gz bugzilla-4c2a23f4df1041fe21d534b38654a0d1c911282e.tar.xz |
Bug 607675: In Firefox, YAHOO.util.Event.addListener/on events no longer exist after a user clicks back
r:LpSolit, a:mkanat
Diffstat (limited to 'template/en/default')
-rw-r--r-- | template/en/default/global/header.html.tmpl | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/template/en/default/global/header.html.tmpl b/template/en/default/global/header.html.tmpl index e5e5a08fb..df5786abf 100644 --- a/template/en/default/global/header.html.tmpl +++ b/template/en/default/global/header.html.tmpl @@ -161,12 +161,14 @@ <script type="text/javascript"> <!-- YAHOO.namespace('bugzilla'); - + YAHOO.util.Event.addListener = function (el, sType, fn, obj, overrideContext) { + if ( ("onpagehide" in window || YAHOO.env.ua.gecko) && sType === "unload") { sType = "pagehide"; }; + var capture = ((sType == "focusin" || sType == "focusout") && !YAHOO.env.ua.ie) ? true : false; + return this._addListener(el, this._getType(sType), fn, obj, overrideContext, capture); + }; if ( "onpagehide" in window || YAHOO.env.ua.gecko) { YAHOO.util.Event._simpleRemove(window, "unload", YAHOO.util.Event._unload); - YAHOO.util.Event._simpleAdd(window, "pagehide", - YAHOO.util.Event._unload); } [%# The language selector needs javascript to set its cookie, # so it is hidden in HTML/CSS by the "bz_default_hidden" class. |