detect-autofill
detect-autofill copied to clipboard
Doesn't work properly in IE11
Describe the bug
It doesn't correctly work for me in IE11 (tested in Browserstack), because even a normal even when you just type in something with a keyboard doesn't have data
property in it: https://github.com/matteobad/detect-autofill/blob/master/src/detect-autofill.js#L46
So every even typing event will trigger autocomplete event to be populated
To Reproduce
Steps to reproduce the behavior:
- Open IE11
- Type in something in the input
- Check that even simple typing triggering autocomplete event
Expected behavior
No autocomplete event populated when just typing
Desktop (please complete the following information):
- OS: Windows 11
- Browser: IE11
- Version: Latest in Browserstack
Additional context
Besides that, thanks for your job! Really appreciated.
Hi @matyas-igor, I can't seem to reproduce the problem, I just took a small test with the demo and get the Event event in IE11. I'll attach a screenshot below.
But while testing I've noticed that after the first autocomplete if the user resets the form or empty the input the next autocomplete won't be triggered because the attribute is already on the INPUT. Maybe I should remove the [autocomplete] at some point
Let me know what you think
Issue here that in IE11 in my react
dev environment I don't have data
in any typing event
Basically, here's my onInput callback:
And what I have in console when I just type (no autofill should be triggered)
Therefore, condition !('data' in event)
is always true in IE11 and typing triggering autofill event: https://github.com/matteobad/detect-autofill/blob/master/src/detect-autofill.js#L28
Oh ok, I didn't understand sorry. I see the problem now, do you already have any idea on how to solve this? As far as I can tell is a bit tricky to detect autofill on IE11