palant / pfp

A simple and secure browser extension to be used with KeePass databases.
https://pfp.works/
Mozilla Public License 2.0
113 stars 14 forks source link

Firefox - Focus input field when popup is opened #81

Closed r-a-y closed 6 years ago

r-a-y commented 6 years ago

In Chrome, clicking on the pfp toolbar button will open the "Enter master password" popup and the text field is automatically focused, making typing the password easy to do.

In Firefox, when clicking on the pfp toolbar button, the "Enter master password" popup opens, but the text field is not focused. It requires an additional click on either the label or the text field in order to type the password. Tested on Firefox 58.0.2 and latest version of pfp.

Can we focus the input field when the popup is opened, similar to Chrome?

palant commented 6 years ago

The input field is being focused on all platforms, some fail to focus the pop-up however - Edge in particular. In Firefox it works for me on Linux, I guess that you are on Windows? I'll try to find a Firefox bug on that or file one if it doesn't exist yet.

palant commented 6 years ago

This seems to be bug 1324255, resolved in Firefox 60 a few days ago. A work-around is being mentioned, namely delaying focusing. However, in case of PfP focusing already is delayed, due to the messaging happening there. So this work-around doesn't seem to be reliable, even if it works at all. This issue only seems to affect out-of-process WebExtensions, meaning extensions.webextensions.remote preference set to true - that's only the case on Windows by default right now.

palant commented 6 years ago

I verified that this bug affects us on Windows and that delayed focusing is ineffective. So there is nothing we can do about it, other than waiting for Firefox 60 to be released (scheduled for May 9). Closing as "invalid" because it's a Firefox bug, not ours.

palant commented 6 years ago

For reference, there is also bug 1435687 which is not yet resolved. It is quite annoying because pressing Enter after autofilling won't work - a click is always required to submit the form.

r-a-y commented 6 years ago

Sorry, I should've mentioned I was using Windows!

Tested on Firefox Nightly and can confirm that the input field is focused now :+1: