Skip to content

not working when label tag is before input in Chrome - solution offered #40

Description

@iivanov2

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);
});
};

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions