Skip to content

Conversation

@max-baz
Copy link
Member

@max-baz max-baz commented Mar 31, 2019

Usual ways of dispatching Enter keypress don't submit forms, because dispatchEvent sets Event.trusted to false and browsers ignore it:

https://developer.mozilla.org/en-US/docs/Web/API/Event/isTrusted

I found an interesting workaround that only works in Chromium(-based?) browser: debugger API.

Basically it allows us to issue "trusted" Enter keypresses, which do submit forms.

Sadly debugger permission is not supported by Firefox at all:

https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/permissions#Browser_compatibility

Fixes browserpass/browserpass-legacy#271
Fixes browserpass/browserpass-legacy#268

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant