aboutsummaryrefslogtreecommitdiffstats
path: root/template
diff options
context:
space:
mode:
authorGuy Pyrzak <guy.pyrzak@gmail.com>2010-08-29 14:22:32 -0700
committerMax Kanat-Alexander <mkanat@bugzilla.org>2010-08-29 14:22:32 -0700
commitb2729ebcc761bd556b5645980c7fb989da50e8c9 (patch)
treeada113f81c614812a52c01c18b4d145fcd3532d7 /template
parent840bfeae940b12f848ef01a06c8e349c0b7c41d3 (diff)
downloadbugs-b2729ebcc761bd556b5645980c7fb989da50e8c9.tar
bugs-b2729ebcc761bd556b5645980c7fb989da50e8c9.tar.gz
bugs-b2729ebcc761bd556b5645980c7fb989da50e8c9.tar.bz2
bugs-b2729ebcc761bd556b5645980c7fb989da50e8c9.tar.xz
bugs-b2729ebcc761bd556b5645980c7fb989da50e8c9.zip
Bug 577574: Make YUI's unload listener into a "pagehide" listener on
browsers that support it. Before this patch, fields using YUI autocomplete were losing their entered data when pressing "Back" in the browser r=mkanat, a=mkanat
Diffstat (limited to 'template')
-rw-r--r--template/en/default/global/header.html.tmpl5
1 files changed, 4 insertions, 1 deletions
diff --git a/template/en/default/global/header.html.tmpl b/template/en/default/global/header.html.tmpl
index f76fdd59f..e6764ed2b 100644
--- a/template/en/default/global/header.html.tmpl
+++ b/template/en/default/global/header.html.tmpl
@@ -154,9 +154,12 @@
<script type="text/javascript">
<!--
YAHOO.namespace('bugzilla');
- if (YAHOO.env.ua.gecko) {
+
+ 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.