Skip to content

Instantly share code, notes, and snippets.

@ldthorne
Created April 5, 2017 19:31
Show Gist options
  • Save ldthorne/f404fd27d02b090a1be9642425073ddf to your computer and use it in GitHub Desktop.
Save ldthorne/f404fd27d02b090a1be9642425073ddf to your computer and use it in GitHub Desktop.
On safari 10.0.3, the first click event is consumed by Safari's autofill. Only on the second click is "Hello World" logged
<html>
<body>
<form>
<input name="email" />
<input name="name" />
</form>
<script>
document.querySelector('input[name="email"]').addEventListener('click', function(event) {
console.log('Hello World');
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment