How to catch the event when an input receives text from the autocomplete? No Jqueryui?

Asked

Viewed 39 times

1

I need to know if you can notice (event) when I’m browsing the listbox generated by the Chrome autocomplete (for example) when it automatically plays address values, phone, etc, in the form fields you have such id´s. That is, I need to style each field exactly when the browser plays autocomplete text in the fields. Follow the code as it is:

<!doctype html>
<html lang="pt-BR">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
</head>
<body>
<input type="text" name="nome">
<input type="text" name="email">
<input type="text" name="telefone">
<style>
body{
	background:#555555;
}
input {
	height:40px; font-size:12pt;
	background: transparent;
}
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    transition: background-color 5000s ease-in-out 0s;
    -webkit-text-fill-color: #000000 !important;
}</style>
</body>
</html> 

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.