Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Detecting browser autofill before selection

Is there anyway I can detect the autofill BEFORE the user selects an option from the dropdown?

enter image description here

Expected: 400010 as seen.

Currently I have:

$('input').on('input paste change keyup', function(event) {
    if(event.type=='input'){
      console.log( $(this).val() ); 
    }
});

.. and it works AFTER the user has made a selection, but not before as seen in the above screenshot.

like image 840
eozzy Avatar asked Dec 19 '14 06:12

eozzy


People also ask

How do I find my browser autofill?

Open your Chrome browser. Click on the three dots at the top right corner. Go to Settings, look for the Autofill section, and select Passwords. You will see a list of websites with usernames and passwords.

Can websites see my autofill?

Browsers are coded to learn and store information when first entered by a user in order to automatically fill text boxes the next time the same information is requested. The feature is called “autofill,” and hackers have turned it into an effective phishing vector.

Is autocomplete the same as autofill?

Autocomplete And Autofill # Although they are closely related: Autofill is a browser feature that allows people to save information (on the browser or the OS) and use it on web forms. autocomplete is an HTML attribute that provides guidelines to the browser on how to (or not to) autofill in fields in a web form.


1 Answers

Read this article, they go in-depth on detected auto-fill events. The problem is that not all browsers support auto-fill events, however I don't think any would be foolish enough to support this feature before the user makes a selection. Think about this: if they supported auto-fill events before a selection was made it would be extremely simple to steal peoples passwords, zipcodes, credit cards, etc. Since you could just send an AJAX request containing the auto completed information in each of these fields, regardless of whether the user actually selected them.

Sorry, if I couldn't be of more help.

like image 194
Alec Avatar answered Sep 30 '22 16:09

Alec