Commit b2729ebc authored by Guy Pyrzak's avatar Guy Pyrzak Committed by Max Kanat-Alexander

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
parent 840bfeae
......@@ -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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment