android-components icon indicating copy to clipboard operation
android-components copied to clipboard

Implement PromptInstanceDelegate

Open agi opened this issue 5 years ago • 3 comments

Bug 1710668 is adding a new API to let GeckoView dismiss prompts that should not be displayed anymore (e.g. if the page navigated away and the prompt is not relevant or a login save prompt that contains known invalid credentials). AC should implement this delegate and dismiss the prompt when onPromptDismiss is called.

Without this you might start seeing stale onLoginSave prompts for HTTP Auth (e.g. when the user tries to login with invalid credentials)

┆Issue is synchronized with this Jira Task

agi avatar Aug 23 '21 17:08 agi

To test this end to end:

  • Navigate to https://jigsaw.w3.org/HTTP/Basic/
  • Enter test test as username/password (these are intentionally incorrect credentials)
  • Page asks for credential again
  • Enter guest guest (correct credentials)
  • Page loads and user is asked to save password, only guest/guest is saved (without the change in this issue, you will get two prompts, one for guest/guest and one for test/test)

agi avatar Aug 23 '21 18:08 agi

@agi onPromptDismiss is indeed called when the page is navigated away, so we have all we need to fix this issue, but I'd like to ask for some additional functionality: Could onPromptDismiss be called when the user un-focuses a credit card form so that we may be able to fix this issue https://github.com/mozilla-mobile/fenix/issues/19707 ?

codrut-topliceanu avatar Sep 07 '21 14:09 codrut-topliceanu

Hi @codrut-topliceanu, yes we are planning to work on https://bugzilla.mozilla.org/show_bug.cgi?id=1715572 (which is the GV side of issue fenix#19707) in the next sprint.

agi avatar Sep 07 '21 18:09 agi