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)
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
Comment 1•8 years ago
|
||
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
Updated•8 years ago
|
tracking-fxios:
--- → ?
| Assignee | ||
Comment 2•8 years ago
|
||
What is the behavior in Mobile Safari?
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.
| Assignee | ||
Comment 5•8 years ago
|
||
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)
| Assignee | ||
Comment 7•8 years ago
|
||
Ugh. This seems to be an ugly WebKit bug:
https://bugs.webkit.org/show_bug.cgi?id=140188
...with an ugly workaround:
https://stackoverflow.com/questions/26253133/cant-set-headers-on-my-wkwebview-post-request/26342224#26342224
| Assignee | ||
Comment 8•8 years ago
|
||
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.
| Assignee | ||
Comment 9•8 years ago
|
||
I built a better example for testing:
https://output.jsbin.com/susudimusi
| Assignee | ||
Comment 10•8 years ago
|
||
https://jsbin.com/gipeba is a more comprehensive example than the one in Comment 9. Use this one for testing instead.
| Assignee | ||
Comment 11•8 years ago
|
||
Apologies for this ugly hack in advance.
Attachment #8927050 -
Flags: review?(jhugman)
Comment 12•8 years ago
|
||
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+
| Assignee | ||
Comment 13•8 years ago
|
||
Landed on master:
https://github.com/mozilla-mobile/firefox-ios/commit/ec90268d63efe49e317ae0729128071d81ce6c38
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.
Description
•