KeePassDX icon indicating copy to clipboard operation
KeePassDX copied to clipboard

Inline autofill not working with database open

Open glemco opened this issue 3 years ago • 8 comments

Describe the bug It could just be a problem of not completely supported keyboards/system (tried on los18 with microg, both florisboard and AnySoftKeyboard). The inline button sign in with keepassdx does appear when the database is closed (from there I can open it and everything works fine with the usual popup). However if the database is already open, on the keyboard I just see select entry and tapping this last one will modify the selected entry with the new URL (even though there was already a match with the present URL). Thanks in advance for the answer and for the great app!

To Reproduce Steps to reproduce the behavior:

  1. Open the database
  2. Go to a website where autofill should work
  3. Try to type the password
  4. The keyboard will behave as if the website wasn't recognized

Expected behavior As far as I understood, the popup shouldn't appear at all and everything should be displayed on the keyboard. It would be nice at least to still have the popup instead of having to close the database for keepassdx not to modify the entry with a duplicate URL.

KeePass Database

  • Created with: Linux KeepassXC
  • Version: 2 - Kdbx4.0
  • Location: internal storage (content://com.android.externalstorage.documents/document/primary:Documents/...)
  • Size: 103 kB
  • Contains attachment: Yes

KeePassDX (please complete the following information):

  • Version: 3.0.2
  • Build: libre
  • Language: Italian

Android (please complete the following information):

  • Device: nextbit Robin and xiaomi mi10 lite (lineage os, not miui)
  • Version: 11

Additional context Add any other context about the problem here.

  • Browser for Autofill: Fennec 94.1.1 (Firefox)
  • Keyboard: AnySoftKeyboard beta, Florisboard

glemco avatar Nov 24 '21 13:11 glemco

Unfortunately, this can happen because the processing speed is a little bit longer than usual, I can't really solve this problem. I did add a warning in the wiki, the functionality is not altered but it is the Autofill service of the device that decides in any case whether to display it or not in the keyboard. https://github.com/Kunzisoft/KeePassDX/wiki/AutoFill#inline-suggestions

J-Jamet avatar Nov 24 '21 17:11 J-Jamet

Hi and thanks for the answer, does this mean that both my devices are too slow to handle the feature? Is it the android system itself causing the problem? It looks like there's no workaround but I still struggle understanding why

glemco avatar Nov 25 '21 08:11 glemco

I'll do some more testing but the main issue is compatibility with Android methods and that it is handled by the system itself. I think it's related to #765, #1165, if you want to understand the reason, you have to look at the code to see the internal workings of the android Autofill libraries and the implementation I made in KeePassDX. https://github.com/Kunzisoft/KeePassDX/tree/master/app/src/main/java/com/kunzisoft/keepass/autofill

J-Jamet avatar Dec 09 '21 10:12 J-Jamet

I just tested and the moment when there can be the return to a popup is simply when the keyboard is not visible when the screen returns to the form to be filled. Otherwise all other cases work for me.

J-Jamet avatar Dec 09 '21 13:12 J-Jamet

There is a requestFocus() in the password field of the database that displays the autofill popup afterwards, but actually I can't do anything about it, it's a problem in the system.

J-Jamet avatar Dec 09 '21 14:12 J-Jamet

Thanks for the deep analysis! I guess I'll need to keep the option disabled for now..

glemco avatar Dec 12 '21 17:12 glemco

Inline autofill sometimes doesn't show up (database is closed) until I reload the tab (happens in both Firefox and Chromium-based browsers). Is this related to the compatibility issues you mentioned earlier? @J-Jamet

E0697 avatar Feb 13 '22 20:02 E0697

The autofill service is managed by the system itself so if the autofill inline is only displayed after a page reload, it could be a normal behavior of the browser or the autofill service. In any case, I don't know how to improve this behavior and even if it is possible from KeePassDX.

J-Jamet avatar Feb 13 '22 20:02 J-Jamet