Closed Bug 1659073 Opened 2 months ago Closed 19 days ago

Expose a new "RepostPrompt" PromptRequest type

Categories

(GeckoView :: General, enhancement, P2)

Unspecified
All
enhancement

Tracking

(firefox82 fixed)

RESOLVED FIXED
82 Branch
Tracking Status
firefox82 --- fixed

People

(Reporter: petru, Assigned: agi, Mentored)

Details

Attachments

(2 files)

Needed for Fenix - https://github.com/mozilla-mobile/fenix/issues/9799 in the context of pull to refresh.

We need a sure way to know that upon dragging the throbber to refresh the page, event that successfully gets to Gecko, the reload operation is cancelled and so the throbber should not anymore wait the page to be reloaded.

I think just adding a new PromptRequest type for this kind of situations would be the simplest approach but of course there might be better solutions.

So we did a bunch of the plumbing to make this possible in Bug 1629113. It should be a matter of adding insecureSubmitCheck to nsIPromptCollection, replace this code with InsecurePromptCollection (like this patch) and implement insecureSubmitCheck on desktop here (example here) and on mobile here (example here).

Mentor: agi
Severity: -- → S4
Priority: -- → P2

Just to confirm, with those changes we would get some sort of a callback based on which we could trigger the action to hide the pull to refresh throbber in Fenix?

(In reply to Petru-Mugurel Lingurar [:petru] from comment #2)

Just to confirm, with those changes we would get some sort of a callback based on which we could trigger the action to hide the pull to refresh throbber in Fenix?

With the changes in Comment 1, you would get a onInsecureSubmitPrompt call instead of the generic onButtonPrompt or whatever you're getting today.

Assignee: nobody → agi
Attachment #9174770 - Attachment description: Bug 1659073 - Add repostConfirm to nsIPromptCollection. → Bug 1659073 - Add confirmRepost to nsIPromptCollection.
Attachment #9174771 - Attachment description: Bug 1659073 - Implement repostConfirm on Mobile. → Bug 1659073 - Implement confirmRepost on Mobile.
Pushed by asferro@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2702170d84c4
Add confirmRepost to nsIPromptCollection. r=pbz,smaug
https://hg.mozilla.org/integration/autoland/rev/de21d23f93cf
Implement confirmRepost on Mobile. r=owlish,snorp
Status: NEW → RESOLVED
Closed: 19 days ago
Resolution: --- → FIXED
Target Milestone: --- → 82 Branch
You need to log in before you can comment on or make changes to this bug.