Closed Bug 1397625 Opened 8 years ago Closed 8 years ago

<form method="post" target="_blank"> not send variables to server on Firefox for ios

Categories

(Firefox for iOS :: General, defect)

Unspecified
iOS 10
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Tracking Status
fxios + ---

People

(Reporter: cocoasui, Assigned: justindarc)

Details

(Keywords: compat, Whiteboard: [MobileCore])

Attachments

(3 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36 Steps to reproduce: I create a form with method of "post" and target of "_blank" using javascript, then submit it. It works well in FireFox for windows. But in FireFox for IOS,i can't get the variables in the form at server side. To check out the problem, i make a simple Test.aspx with a <form method="post" target="_blank">. Actual results: Then I find the bug:<form method="post" target="_blank"> not send variables to server. Expected results: The variables in <form> should be sent to server.
Summary: <form method="post" target="_blank"> not send variables to server → <form method="post" target="_blank"> not send variables to server on Firefox for ios
as this is Firefox iOS issue, moving to the Firefox iOS product module.
Component: HTML: Form Submission → General
Product: Core → Firefox for iOS
Version: Other Branch → unspecified
What is the behavior in Mobile Safari?
Flags: needinfo?(cocoasui)
Keywords: compat
Whiteboard: [MobileCore]
Flags: needinfo?(cocoasui)
OS: Unspecified → iOS 10
Platform: [iphone se] [ios 10.2] [FireFox for ios] version: 8.2(5213)
(In reply to Justin D'Arcangelo [:justindarc] from comment #2) > What is the behavior in Mobile Safari? In mobile Safari,the variables in <form> will be sent to server.
Taking to investigate.
Assignee: nobody → jdarcangelo
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
I wanted to report a similar bug and want add that Firefox for iOS opens two tabs: One blank tab and one with the actual action page but without submitting the POST data. You can test the behavior with the following link: https://www.w3schools.com/code/tryit.asp?filename=FL8C0MNXMT52 This code works perfectly in all other browsers which I know („Safari for iOS“, Firefox for Windows and Linux, Internet Explorer 11, Microsoft Edge, Chromium)
Hmm.. This seems to work in Chrome for iOS which is also using WKWebView. I may need to take a peek and see if I can get any clues as to how they're able to pass along the form POST data from the WKNavigationDelegate.
I built a better example for testing: https://output.jsbin.com/susudimusi
Attached file Example for testing
https://jsbin.com/gipeba is a more comprehensive example than the one in Comment 9. Use this one for testing instead.
Attached file GitHub Pull Request
Apologies for this ugly hack in advance.
Attachment #8927050 - Flags: review?(jhugman)
Comment on attachment 8927050 [details] [review] GitHub Pull Request Looks better than your apologies made it sound. One small naming nit.
Attachment #8927050 - Flags: review?(jhugman) → review+
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: