Closed Bug 796661 Opened 12 years ago Closed 12 years ago

[Browser] Confirm reloading POST request

Categories

(Firefox OS Graveyard :: Gaia::Browser, defect, P1)

defect

Tracking

(blocking-basecamp:+)

VERIFIED FIXED
B2G C1 (to 19nov)
blocking-basecamp +

People

(Reporter: ghtobz, Assigned: ochameau)

References

Details

(Keywords: feature, l12y, reproducible, Whiteboard: [label:story][label:browser][label:needsGeckoSupport][label:needsUXinput][label:needsVISUALinput][LOE:S])

Attachments

(1 file)

[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!
[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.
[GitHub comment by benfrancis on 2012-09-24T10:46:51Z]
Sigh. Good catch Tim.
[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.
[GitHub comment by autonome on 2012-09-24T15:35:47Z]
@timdream does focusing the URL bar and hitting <enter> reload that page?
[GitHub comment by benfrancis on 2012-09-24T15:45:58Z]
Yes it does, it will just send a GET rather than a POST request.
[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
[GitHub comment by autonome on 2012-09-26T16:16:34Z]
Is there any Gaia work for this once the platform issue lands?
[GitHub comment by benfrancis on 2012-09-26T16:17:16Z]
Yes, about the same as HTTP Auth I would imagine. Estimating as LOE:S
[mass adding reproducible keyword for any open Gaia bug with the word "STR:" in comments]
Keywords: reproducible
Component: Gaia → Gaia::Browser
Priority: -- → P1
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)
Keywords: feature
Alex, do you have an ETA for a patch for this?
Patch in progress, should be ready for tuesday/wednesday.
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)
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?
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+
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
Landed:
https://github.com/mozilla-b2g/gaia/commit/b700c4da43a5732ed1e5aa9c5cb6bcfca3937eb2
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Verified as fixed in build 20121231070201.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: