detect-autofill icon indicating copy to clipboard operation
detect-autofill copied to clipboard

Doesn't work properly in IE11

Open matyas-igor opened this issue 4 years ago • 3 comments

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:

  1. Open IE11
  2. Type in something in the input
  3. 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.

matyas-igor avatar Apr 07 '20 11:04 matyas-igor

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.

Capture

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

matteobad avatar Apr 11 '20 14:04 matteobad

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: image

And what I have in console when I just type (no autofill should be triggered) image

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

matyas-igor avatar Apr 16 '20 16:04 matyas-igor

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

matteobad avatar Apr 18 '20 16:04 matteobad