If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

[Browser] Confirm reloading POST request

VERIFIED FIXED in B2G C1 (to 19nov)

Status

Firefox OS
Gaia::Browser
P1
normal
VERIFIED FIXED
5 years ago
3 years ago

People

(Reporter: GH to BZ, Assigned: ochameau)

Tracking

({feature, l12y, reproducible})

unspecified
B2G C1 (to 19nov)
feature, l12y, reproducible

Firefox Tracking Flags

(blocking-basecamp:+)

Details

(Whiteboard: [label:story][label:browser][label:needsGeckoSupport][label:needsUXinput][label:needsVISUALinput][LOE:S])

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
[GitHub issue by timdream on 2012-09-17T17:09:41Z, https://github.com/mozilla-b2g/gaia/issues/4817]
As a user I want to be asked to confirm whether or not I want to reload a page if it will re-send POST data, so I don't accidentally submit my order for a new Ferrari twice


Was: [Browser] Unable to reload a page coming from POST request, no warning shown

STR:

1. Open up Browser, go to http://pda.5284.com.tw/MQS/businfo2.jsp?routename=555
2. Click on the "立即更新" (refresh now) button, which submits a POST request form but loads the same page.
3. Attempt to reload by press the reload button on the browser chrome.

Expected:

1. A prompt should show up with warning text, saying something like (e.g., on Desktop Firefox)

    To display this page, Firefox must send information that will repeat any action (such as a search or order confirmation) that was performed earlier. [Reload] [Cancel]

2. Upon pressing [Reload], the page reloads. Press [Cancel] and the page will not reload

Actual:

1. The page is not reload nor any warning shows.

Note:

@benfrancis We'll need platform `mozbrowserXXX` event for this. And we need to implement the UI 3 times. Yeah!
(Reporter)

Comment 1

5 years ago
[GitHub comment by timdream on 2012-09-17T17:10:27Z]
Fortunately this doesn't result crash like the HTTP auth dialog did ... but this is definitely a blocker.
(Reporter)

Comment 2

5 years ago
[GitHub comment by benfrancis on 2012-09-24T10:46:51Z]
Sigh. Good catch Tim.
(Reporter)

Comment 3

5 years ago
[GitHub comment by benfrancis on 2012-09-24T11:03:47Z]
I've filed https://bugzilla.mozilla.org/show_bug.cgi?id=793644 for the platform part.

Also marking needUXInput but we'll probably just need some copy and button labels for a simple dialog, should this be marked as a blocker.
(Reporter)

Comment 4

5 years ago
[GitHub comment by autonome on 2012-09-24T15:35:47Z]
@timdream does focusing the URL bar and hitting <enter> reload that page?
(Reporter)

Comment 5

5 years ago
[GitHub comment by benfrancis on 2012-09-24T15:45:58Z]
Yes it does, it will just send a GET rather than a POST request.
(Reporter)

Comment 6

5 years ago
[GitHub comment by benfrancis on 2012-09-24T17:54:44Z]
@autonome FYI the platform part of this just got marked blocking-basecamp+ https://bugzilla.mozilla.org/show_bug.cgi?id=793644
(Reporter)

Comment 7

5 years ago
[GitHub comment by autonome on 2012-09-26T16:16:34Z]
Is there any Gaia work for this once the platform issue lands?
(Reporter)

Comment 8

5 years ago
[GitHub comment by benfrancis on 2012-09-26T16:17:16Z]
Yes, about the same as HTTP Auth I would imagine. Estimating as LOE:S
Depends on: 793644

Comment 9

5 years ago
[mass adding reproducible keyword for any open Gaia bug with the word "STR:" in comments]
Keywords: reproducible
Component: Gaia → Gaia::Browser

Updated

5 years ago
Priority: -- → P1
Assignee: ben → poirot.alex
We're marking this bug with the C1 milestone since it follows the criteria of "unfinished feature work" (see https://etherpad.mozilla.org/b2g-convergence-schedule).

If this work is not finished by Nov19, this bug will need an exception and will be called out at the upcoming Exec Review.
Target Milestone: --- → B2G C1 (to 19nov)

Updated

5 years ago
Keywords: feature
Alex, do you have an ETA for a patch for this?
(Assignee)

Comment 12

5 years ago
Patch in progress, should be ready for tuesday/wednesday.
(Assignee)

Comment 13

5 years ago
Created attachment 681030 [details]
Pull request 6376 - implement support for `custom-prompt` modals

Patrick, Could you take a quick overview on this patch and confirm that I've added a decent support for new 'custom-prompt' modals you addded throught bug 793644?

Ben, Here is a patch to fix reload issue, and eventually other modals that are of type 'custom-prompt'. I'm now trying to build integration unit test for this, but it isn't really clear if it is possible. Especially due to the need to serve a webpage...
Attachment #681030 - Flags: review?(ben)
Attachment #681030 - Flags: feedback?(pwang)
Attachment #681030 - Flags: feedback?(pwang) → feedback+
Comment on attachment 681030 [details]
Pull request 6376 - implement support for `custom-prompt` modals

Etienne knows about custom dialog. Let's see if he can help with the review.
Attachment #681030 - Flags: review?(etienne)
(Assignee)

Comment 15

5 years ago
Oh I just realized that I'm most likely missing some l10n work in my patch.
Can I still introduce new strings?
Should I just add these new strings to browser.en-US.properties or do I need to add them to all locales?
Until 11/15.
I thought browser was already string frozen? I'd like to know because I have some other string changes I need to make. Wasn't there a special process for late string changes?
(Assignee)

Comment 18

5 years ago
etienne, here is the testpage I used to play with this feature:
http://test.techno-barje.fr/form/
(In reply to Ben Francis [:benfrancis] from comment #17)
> I thought browser was already string frozen? I'd like to know because I have
> some other string changes I need to make. Wasn't there a special process for
> late string changes?

Oops, yes you are correct. Contact Stas about late string changes. Please coordinate so he knows about all the late changes coming down the pipe.
Comment on attachment 681030 [details]
Pull request 6376 - implement support for `custom-prompt` modals

After Ben's review, please squash before landing :)
Attachment #681030 - Flags: review?(etienne) → review+
(Assignee)

Comment 21

5 years ago
Stas, This patch is about to introduce few strings that comes from mozilla-central:
https://github.com/mozilla-b2g/gaia/pull/6376/files#diff-2

( http://mxr.mozilla.org/mozilla-central/source/toolkit/locales/en-US/chrome/global/commonDialogs.properties#12 )
Comment on attachment 681030 [details]
Pull request 6376 - implement support for `custom-prompt` modals

Etienne's review is enough for the prompt. Let's go ahead.
Attachment #681030 - Flags: review?(ben)
Sorry it took me a while to get to this. 

The modal prompts code really needs a refactor, to use building blocks amongst other things, but we can address that later.

FWIW this patch is fine with me now that Etienne's suggested changes have been applied.

Thanks!
Keywords: l12y
(Assignee)

Comment 24

5 years ago
Landed:
https://github.com/mozilla-b2g/gaia/commit/b700c4da43a5732ed1e5aa9c5cb6bcfca3937eb2
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Duplicate of this bug: 814433

Comment 26

5 years ago
Verified as fixed in build 20121231070201.
Status: RESOLVED → VERIFIED
https://moztrap.mozilla.org/manage/case/15078/
You need to log in before you can comment on or make changes to this bug.