else {
that.devbridgeAutocomplete(options_user);
}
+ that.addClass('bz_autocomplete');
});
// init autocomplete fields with array of values
this.focus();
}
});
+ that.addClass('bz_autocomplete');
});
});
if (translated) return translated;
return value;
}
+
+// jQuery auto-completion disables browser native autocompletion, however this
+// excludes it from being restored by bfcache. Trick the browser into restoring
+// it 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() {
+ $('.bz_autocomplete').attr('autocomplete', 'off');
+ });
+});