-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Could not access window created using window.open('about:blank' .... code #2481
Comments
mozilla-mobile#2481 [Reason] about: url scheme was going to ignore and consider as not valid url scheme for open model/tab in browser. [Solution] Add about in array of valid url chemes for open model/tab
Thanks for filing this issue. We are having a hard time understanding this issue. |
Hi, I explain same thing here too. Let me know if you need more information. |
We at A3H.org (Activities & Attractions Association of Hawaii) just encountered this issue, in a very real-world use case. We host a real-time booking system which works in conjunction with companies' (third-party) web sites. The customer access the company's web site which has a form for booking a trip. When the customer clicks the submit button, the Javascript code that we supplied opens a blank popup window, which is then filled using document.write() with some https://www.prideofmaui.com/turtlesnorkel/#booknow (the booking form at the right) is an example. With Firefox on IOS, it doesn't work. In all other Firefox versions that I tried, everything is fine. Moreover, Safari and Chrome on IOS also work file; Google Browser on IOS doesn't seem to work, though. |
We have situation when we need check if window with window name exsists. If it exists we add some additional information to window otherwise we create window with this new information. `let winName = "win-name", if(win.customObject){ |
We have a similar situation in which we open a blank window and afterwards set the location of that window like this:
This works on all browsers except for firefox on iOS. We open an empty window first because it's not possible/allowed to open a window in an async callback. The only way for us to get around this is to get the uris needed to open the window before the user clicks on a button/link which is not feasible for our use case. |
@Elias-Serneels Does your code work in Google App on IOS, by the way? |
@pvgoran I just tested and no it doesn't. Here is a codepen to demonstrate the issue: https://codepen.io/anon/pen/bLrPQq edit: The codepen seems to affect the issue so it's best to try it out for yourselves. |
As I explain in my previous finding also, the root cause of this issue is we have this variable "SchemesAllowedToOpenAsPopups" which behaving as a gatekeeper. It choose which URL scheme will going to open in popup window and which not. WKWebView have delegate which call when some page want to open popups. as a browser you have to create new WKWebView instance and return it to that delegate. but what firefox do is, for certain url sheme it return WKWebView instance and for other it just return null.
BEST SOLUTION WILL BE |
We have this issue also. Our web site is a web enabled application that is password protected. Customers can view PDFs but not via direct links - we don't want the PDFs available via a simple URL that anyone could use. Instead we open a blank window. In the first window we submit a POST request to our server and set the target of the response to the new, blank window. This works correctly in most browsers, including FireFox in Windows but it does not work in FireFox on an iPad. It does work correctly in Safari on an iPad. |
Closing due to inactivity. Please reopen if you feel it is still is relevant |
Hej,
I found weird behavior in firefox-iOS, while opening new window/popup using about:blank new window created by browser is not accessible and this is happening in Firefox-iOS only not in safari.
To make long story sort i created demo javascript to produce the error please have a look at it.
[Code:javascript]
var win = window.open('about:blank','windownamenew','width=1,height=1,left=5,top=3');
setTimeout(function() { win.close();}, 3000);
[Code:end]
purpose of above code is to create new window and then close it after few seconds.
but it not behave proper in firefox.
here is a video to demonstrate.
https://drive.google.com/file/d/0B7fztZykJUJMcldoRHB6QTBLSUE/view?usp=sharing
OR
firefoxBug.zip
In it you can see that safari works fine but in firefox it not.
[Next-step]
If you guys approve it as an issue then i have solution.
The text was updated successfully, but these errors were encountered: