I have a problem with autofill feauture of my browser. Once a user logins with her email and password, browser holds these two information for future reference. When she opens login page, email and password fields are populated by browser. Event which I binded using jquery for email triggered. On the other hand event for password isn't triggered.
Login form contains following lines:
<form method="post" action="/login" id="login-form">
<input type="email" placeholder="Email" id="email" name="email"/>
<input type="password" placeholder="Password" id="password" name="password"/>
<button type="submit" />
</form>
My script file:
<script type="text/javascript">
$(document).ready(function () {
$("#email").on('change keyup paste mouseup',function () {
alert("email");
});
$("#password").on('change keyup paste mouseup',function () {
alert("password");
});
});
</script>
These two fields are populated by browser successfully. But only "email" messages is shown. Event which is for password isn't triggered.
Any suggestions ?
Thanks.