Closed Bug 1715572 Opened 3 years ago Closed 2 years ago

Select prompts should be dismissed when user clicks other fields

Categories

(GeckoView :: General, enhancement, P1)

Unspecified
All
enhancement

Tracking

(firefox-esr91 wontfix, firefox100 wontfix, firefox101 wontfix, firefox102 wontfix, firefox103 fixed, firefox104 wontfix, firefox105 wontfix, firefox106 wontfix, firefox110 fixed)

RESOLVED FIXED
103 Branch
Tracking Status
firefox-esr91 --- wontfix
firefox100 --- wontfix
firefox101 --- wontfix
firefox102 --- wontfix
firefox103 --- fixed
firefox104 --- wontfix
firefox105 --- wontfix
firefox106 --- wontfix
firefox110 --- fixed

People

(Reporter: petru, Assigned: m_kato)

References

Details

(Whiteboard: [geckoview:m105] [geckoview:m106] [geckoview:m107] [geckoview:m108] [geckoview:m109] [geckoview:m110])

Attachments

(4 files, 1 obsolete file)

Needed for https://github.com/mozilla-mobile/fenix/issues/19707

We currently have the onLoginSelect and onCreditCardSelect prompts which will be triggered whenever the user clicks on a field that can be autocompleted with that type of data.

But these prompts will stay on the screen (at the bottom) until they are consumed by the user picking an item to be autocompleted.

I propose a similar API, maybe something like onCancelLoginSelect and onCancelCreditCardSelect for when the user clicks in another field / another part of the page which cannot be autocompleted with the data from that prompt.
And then, when the user clicks again in a credit card / login field for the prompt to be re-requested.

I think this would lead to a similar UX as on desktop.

Severity: -- → S3
Depends on: 1710668
Flags: needinfo?(petru.lingurar)
Priority: -- → P2
Whiteboard: [geckoview:m93?]
Flags: needinfo?(petru.lingurar)
Whiteboard: [geckoview:m93?] → [geckoview:m94?]

FWIW I don't think we need a new API for this, onPromptDismiss is already present in PromptInstanceDelegate which all promps have: https://searchfox.org/mozilla-central/source/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoSession.java#3744

we just need to call dismiss on the prompt when we navigate away on the JS side.

Assigning to m_kato who was assigned to the duplicate.

Assignee: nobody → m_kato
Keywords: leave-open

Bumping priority to P1 since Makoto is working on this bug.

Keywords: leave-open
Priority: P2 → P1
Whiteboard: [geckoview:m94?] → [geckoview:m94?] [geckoview:m102]
Attachment #9277485 - Attachment description: Bug 1715572 - onPromptDismiss should be callded when losting focus by content script. r=#geckoview-reviewers → Bug 1715572 - Choice prompt should be dismissed when focus is lost by content script. r=#geckoview-reviewers

We need to handle FormAutoComplete:ClosePopup to dismiss autocomplete pop up.

When we add some tests for autocomplete, it may cause test failure due to test
order. Pop up is opened before using fetched data. So I add a workaround to
remove previous credit card and address information for some tests.

Depends on D147054

Carrying forward to 103. Agi says this fix will be too complex to uplift to Beta 102.

Whiteboard: [geckoview:m94?] [geckoview:m102] → [geckoview:m94?] [geckoview:m102] [geckoview:m103]
Pushed by m_kato@ga2.so-net.ne.jp: https://hg.mozilla.org/integration/autoland/rev/0f2d85a32350 Choice prompt should be dismissed when focus is lost by content script. r=geckoview-reviewers,agi
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 103 Branch

This bug has leave-open keyword

Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Status: REOPENED → ASSIGNED
Keywords: leave-open
Regressions: 1771945
Pushed by m_kato@ga2.so-net.ne.jp: https://hg.mozilla.org/integration/autoland/rev/6a1a61daa78f DateTime prompt should be dismissed when focus is lost by content script. r=geckoview-reviewers,agi
Depends on: 1776138

Makoto, this bug has the leave-open keyword. You landed a prompt fix last month in 103 (comment 12) and all the dependencies are resolved. Is any work remaining? Or can we remove the leave-open keyword and resolved this bug as FIXED?

Flags: needinfo?(m_kato)

Makoto, this bug has the leave-open keyword. You landed a prompt fix last month in 103 (comment 12) and all the dependencies are resolved. Is any work remaining? Or can we remove the leave-open keyword and resolved this bug as FIXED?

I have to update a fix for D147055. Now I am working it now.

Flags: needinfo?(m_kato)

(In reply to Makoto Kato [:m_kato] from comment #15)

I have to update a fix for D147055. Now I am working it now.

In that case, I will add this bug to our 105 sprint bugs.

Keywords: leave-open
Whiteboard: [geckoview:m94?] [geckoview:m102] [geckoview:m103] → [geckoview:mm105]
Whiteboard: [geckoview:mm105] → [geckoview:m105]

Rolling this bug over to 106

Makoto, you have some code changes planned based on review feedback. Will you have time to make the changes and land them in the Nightly 106 cycle?

Flags: needinfo?(m_kato)
Whiteboard: [geckoview:m105] → [geckoview:m105] [geckoview:m106]

I would like to clean up GeckoViewAutocomplete to share toolkit's code and
add more delegations.

Attachment #9277740 - Attachment description: Bug 1715572 - Autocomplete handles dismiss prompt. r=#geckoview-reviewers → Bug 1715572 - Part 4. Allow more autocomplete delegations for GeckoView. r=#geckoview-reviewers,sgalich!
Flags: needinfo?(m_kato)

(In reply to Chris Peterson [:cpeterson] from comment #17)

Rolling this bug over to 106

Makoto, you have some code changes planned based on review feedback. Will you have time to make the changes and land them in the Nightly 106 cycle?

Sorry for delay. It may be too late in 106...

Nightly 106 soft freeze starts tomorrow. We should probably wait until next week and land this fix in Nightly 107. That will give us more Nightly test time.

Whiteboard: [geckoview:m105] [geckoview:m106] → [geckoview:m105] [geckoview:m106] [geckoview:m107]
Whiteboard: [geckoview:m105] [geckoview:m106] [geckoview:m107] → [geckoview:m105] [geckoview:m106] [geckoview:m107] [geckoview:m108]
Summary: [Prompts] Select prompts should be dismissed when user clicks other fields → Select prompts should be dismissed when user clicks other fields
Whiteboard: [geckoview:m105] [geckoview:m106] [geckoview:m107] [geckoview:m108] → [geckoview:m105] [geckoview:m106] [geckoview:m107] [geckoview:m108] [geckoview:m109]
Attachment #9277740 - Attachment is obsolete: true
Attachment #9294565 - Attachment description: Bug 1715572 - Part 3. Clean up GeckoViewAutocomplete to delegate prompts easily. r=#geckoview-reviewers → Bug 1715572 - Part 3. Delegate dismiss popup of AutocompleteParent to GeckoView. r=#geckoview-reviewers
Attachment #9294566 - Attachment description: Bug 1715572 - Part 5. Add geckoview-junit test. r=#geckoview-reviewers → Bug 1715572 - Part 4. Add geckoview-junit test. r=#geckoview-reviewers
Whiteboard: [geckoview:m105] [geckoview:m106] [geckoview:m107] [geckoview:m108] [geckoview:m109] → [geckoview:m105] [geckoview:m106] [geckoview:m107] [geckoview:m108] [geckoview:m109] [geckoview:m110]
Pushed by m_kato@ga2.so-net.ne.jp: https://hg.mozilla.org/integration/autoland/rev/965040ea8caf Part 3. Delegate dismiss popup of AutocompleteParent to GeckoView. r=geckoview-reviewers,owlish https://hg.mozilla.org/integration/autoland/rev/21babdb0982a Part 4. Add geckoview-junit test. r=geckoview-reviewers,owlish
Status: ASSIGNED → RESOLVED
Closed: 2 years ago2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: