ususdei / qute-keepassxc

Qutebrowser userscript to fetch credentials from KeepassXC password database
MIT License
54 stars 10 forks source link

Form autocomplete doesn't trigger JS events #3

Closed aearil closed 4 years ago

aearil commented 4 years ago

A lot of website now have JS disabling the login button or simply not registering there is something in the fields until it sees you actually typing. The problem is that qute-keepassxc doesn't trigger those events.

For exemple when I want to login into discord, I need to type and delete another character in both fields or else the values in both input fields seems to get ignored.

I don't know much JS, I tried something like the following without any success:

                    input.focus();
                    input.value = %s;
                    input.dispatchEvent(new KeyboardEvent('keydown',{'key':'a'}));
                    input.dispatchEvent(new KeyboardEvent('keypress',{'key':'a'}));
                    input.dispatchEvent(new KeyboardEvent('keyup',{'key':'a'}));
                    input.blur();

Do you have any ideas ?