summaryrefslogtreecommitdiffstats
path: root/js/global.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/global.js')
-rw-r--r--js/global.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/js/global.js b/js/global.js
index 7ecd3d901..896860d60 100644
--- a/js/global.js
+++ b/js/global.js
@@ -110,3 +110,16 @@ if (!String.prototype.htmlEncode) {
};
})();
}
+
+// our auto-completion disables browser native autocompletion, however this
+// excludes it from being restored by bf-cache. trick the browser into
+// restoring by changing the autocomplete attribute when a page is hidden and
+// shown.
+$().ready(function() {
+ $(window).on('pagehide', function() {
+ $('.bz_autocomplete').attr('autocomplete', 'on');
+ });
+ $(window).on('pageshow', function(event) {
+ $('.bz_autocomplete').attr('autocomplete', 'off');
+ });
+});