Chrome is still loading the data... apparently they are added (by chrome), removed (by Elk), and then added again. >_<
I tried with a timed out call like that:
/**
* Attempt to prevent browsers from auto completing fields when viewing/editing other members profiles
* or when register new member
*/
function disableAutoComplete()
{
if (document.addEventListener)
document.addEventListener("DOMContentLoaded", delay_disableAutoCompleteNow, false);
}
function delay_disableAutoCompleteNow()
{
setTimeout(function() {disableAutoCompleteNow();}, 100);
}
/**
* Once DOMContentLoaded is triggered, find text and password fields in the forms
* turn autocomplete off and sempty the value.
*/
function disableAutoCompleteNow()
{
$("input[type=text]").attr("autocomplete", "off").val('');
$("input[type=email]").attr("autocomplete", "off").val('');
$("input[type=password]").attr("autocomplete", "off").val('');
}
it works, but is really a bit odd...