Describe the bug
not working when label tag Email is before input in Chrome on Windows 10
A clear and concise description of what the bug is.
Information
- OS: Windos 10
- Browser: Chrome
Additional context
The solution which I have written is the bold text (all other is context to get you point where to put it). This fake invisible label tags mislead Chrome browser and it does not add auto fill when type in the input field.
_helper.randomizeInput = function(obj, settings) {
obj.find('input').each(function(i) {
realFields[i] = $(this).attr('name');
if(realFieldsMapper[realFields[i]]) {
$(this).attr('name', realFieldsMapper[realFields[i]]);
} else {
var randomName = Math.random().toString(36).replace(/[^a-z]+/g, '');
$(this).attr('name', randomName);
realFieldsMapper[realFields[i]] = randomName;
}
$('<label style="display:none;">autocomplete-off</label>').insertBefore(this);
});
};
Describe the bug
not working when label tag Email is before input in Chrome on Windows 10
A clear and concise description of what the bug is.
Information
Additional context
The solution which I have written is the bold text (all other is context to get you point where to put it). This fake invisible label tags mislead Chrome browser and it does not add auto fill when type in the input field.
_helper.randomizeInput = function(obj, settings) {
obj.find('input').each(function(i) {
realFields[i] = $(this).attr('name');
if(realFieldsMapper[realFields[i]]) {
$(this).attr('name', realFieldsMapper[realFields[i]]);
} else {
var randomName = Math.random().toString(36).replace(/[^a-z]+/g, '');
$(this).attr('name', randomName);
realFieldsMapper[realFields[i]] = randomName;
}
$('<label style="display:none;">autocomplete-off</label>').insertBefore(this);
});
};