WebView::onCreateWindow() not working for multiple window.open()
Reported by
sri...@promobitech.com,
Aug 26 2016
|
||||||
Issue description
Steps to reproduce the problem:
1. Create a Webview and set support for multiple windows and automatically open windows to true.
2. Create a custom web-chrome client and override onCreateWindow and create a new webview and add it to layout
2. Call webview.loadURL("http://popuptest.com/");
3. Click on MultiPopUp test option. It is supposed to open 7 popups using window.open()
What is the expected behavior?
Supplying a new WebView each time to the WebViewTransport from onCreateWindow should load all the URL's properly.
What went wrong?
7 new WebViews are created and returned in onCreateWindow (via the WebViewTransprot)
Only 3 load properly
The other 4 do not respond at all - just show blank view - onPageStarted is never called.
Did this work before? N/A
Chrome version: 52.0.2743.98 Channel: stable
OS Version: 6.0
Flash Version: Shockwave Flash 22.0 r0
1. On the same page, the Timed Pop-up option works and able to create n number of webview and load properly.
08-26 18:03:04.672 W/cr_AwContents: Popup WebView bind failed: no pending content.
08-26 18:03:04.672 W/cr_AwContents: WebView.destroy() called while WebView is still attached to window.
08-26 18:03:04.697 5889-5889/com.promobitech.mobilock.pro.staging D/CustomWebChromeClient: Progress: 90
08-26 18:03:04.704 W/cr_AwContents: Popup WebView bind failed: no pending content.
08-26 18:03:04.704 W/cr_AwContents: WebView.destroy() called while WebView is still attached to window.
,
Aug 26 2016
Note: the site claims that it opens the popups in 7 different ways. What WebView version are you using? Settings -> Apps -> Android System WebView
,
Aug 26 2016
I am using Android System Webview v52.0.2743.98 . This happens on 4.4.2 device as well.
,
Aug 26 2016
Just on the example part, I have used simple W3S TrtIt editoe to run code that calls window.open() multiple times on a button click. Even with that 2-3 windows load just fine. Beyond 4 is where i see the problem. (I am doing this for a client whose site does something similar for their Job Tickets)
,
Aug 26 2016
I'm guessing chrome's default spam blocking kicked in, but that doesn't get exposed in any way in webview. Probably turn that off for webview.
,
Aug 26 2016
Uhh, I take that back.. > 08-26 18:03:04.704 W/cr_AwContents: Popup WebView bind failed: no pending content. That sounds like a real error. Do you have a test apk to reproduce this?
,
Aug 26 2016
Sorry but what should be turned off, are you referring to any setting in android webview? These sites work fine in mobile chrome and hence trying to achieve the same using android webview.
,
Aug 26 2016
Ok saw your updated comment. Will make a test apk tomorrow and upload, its a little late here IST.
,
Aug 27 2016
PFA MW-WebView.apk, a very basic sample which opens multiple windows and attaches to a FrameLayout as they open. Selecting Close, will close them one by one until we reach the base webview which opened all the child views. The example was built on top of https://github.com/Rockncoder/WebView
,
Aug 29 2016
So the problem is webview does not support opening pop up windows in *rapid succession*. Webview only holds one pending pop up right now, so if another pop up is created before that one is attached to a webview, the new pop up just gets closed immediately. This would be a good bug for *someone else* to fix, to pick up how on how the pop up flow in webview works. It's not impossible to support this correctly. But why do you need to rely on this behavior? It's probably actively user hostile.
,
Aug 30 2016
Actually we have couple of customers who have web-sites used by IT teams or their field agents and they load up all the tickets right upfront. The option on their site opens up all the tickets in new windows in Chrome and we wanted to have same behaviour in our application for them which uses a WebView. So at this moment is there an alternative for this or is this something that will be different when compared to Chrome?
,
Aug 30 2016
no modern browser is going to allow the page to start that many pop ups all at once, chrome will have a dialog blocking pop ups after the second one I think your workaround is to stop using pop ups
,
Aug 30 2016
Hmm.. actually Mobile Chrome is working and working properly without any setting changes. We are looking on how else to change the flow on the website, but as long as Chrome on Mobile works, people would be comparing and hence a little hard to justify.
,
Aug 30 2016
that's a bug in chrome on android then
,
Aug 30 2016
Just to add, that Mobile Chrome works fine on the customer's site which call "window.open()" for the required number of times. The popup site of-course does not work unless we allow for popups.
,
Aug 30 2017
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Aug 30 2017
,
Aug 31
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Sep 4
|
||||||
►
Sign in to add a comment |
||||||
Comment 1 by ppolise...@chromium.org
, Aug 26 2016