|
Rank: Advanced Member Groups: Member
Joined: 7/21/2014 Posts: 134
|
Hi, We have had a problem since upgrading to version 25 (25.1.22): multiple downloads no longer seem to work. You can test this: https://fab-c.github.io/multidownloads.html. The Download buttons work fine, but the "Download All" button only downloads one of the two files. It works correctly in Chrome and was also functioning in EO.WebBrowser version 24.0.49.0. Thank you in advance for addressing this issue and releasing a fix.
|
|
Rank: Advanced Member Groups: Member
Joined: 7/21/2014 Posts: 134
|
I forgot to mention that we tested with .SetFeatureState(EO.WebEngine.EngineFeature.MultipleDownloads, True), but it doesn't change the behavior.
Even the NewWindow event doesn't seem to be triggered.
Thanks !
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,338
|
Hi, Sorry about the delay. The download urls in the sample page no longer seem to work. Multi-download is enabled by default. So SetFeatureState(EO.WebEngine.EngineFeatures.MultipleDownloads, true) has no effect. The difference between version 25.1.22 and previous v25 build is previous v25 build would display a permission bubble asking user whether to allow multi-download, but since version 25.1.22 whether to allow multi-download is explicitly controlled by EngineFeatures.MultipleDownloads. It appears that the problem is related to the code using window.open instead of link.click method. We tested multiple downloads feature with this test page: https://sindresorhus.com/multi-download/This page dynamically creates HTML A element and then call the element's click method to initialize download and the above page works correctly with build 25.1.22. If you have a working test page that uses window.open method and it does work correctly in Google Chrome, please send it us and we will test it again. Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 7/21/2014 Posts: 134
|
Hello, We have fixed the URLs on the test page, you can try again ( https://fab-c.github.io/multidownloads.html) Indeed, the issue may be caused by the chaining of window.open rather than multiple downloads. In any case, it was working on previous versions and on Chrome. The problem might be that EO.WebBrowser does not handle the permission request for multiple popups?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,338
|
Hi, We have looked into this. Please try to use the HTML A element click() method to perform multiple downloads. The reason that window.open method didn't work properly is because Chromium's built-in popup blocker. Chromium's built-in popup blocker only allows one "activation" per click. This means one click one new window. The second new window will be automatically blocked since there are no more clicks to associate it with. Google Chrome does have the UI for end user to override this policy but EO.WebBrowser does not have any UI/options for you to do so. The only option is to disable the popup blocker entirely with EngineOption.ExtraCommandLineArgs:
Code: C#
EO.WebEngine.EngineOptions.Default.ExtraCommandLineArgs = "--disable-popup-blocking";
However this will disable the popup blocker completely so it may not be what you wanted. Additionally, even with the above ExtraCommandLineArgs option, the TabbedBrowser sample application still will not download both files correctly. This is because the sample application only attach download related events (BeforeDownload/DownloadCompleted/DownloadCancelled) when the WebView is actively selected --- since the tabbed UI only have a single selected WebView at any given time, so downloaded events are only handled for a single WebView instead of both. Considering that A element click() does not either of the above restrictions, that would be the recommended method. Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 7/21/2014 Posts: 134
|
Hi,
Thanks for the option to disable popup blocker that seems to work.
To avoid to disable the popup blocking for the entire webbrowser, could you image to use the WebView.RequestPermissions Events to allow only some websites ? Like we do for microphone, notifications, etc.
I know mulitple window.open() it's not a best practice, but the website doesn't belong to me and I can't change the source code. I just replicated a page so you can see the issue and run some tests. 😉
Thanks !
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,338
|
No. There is no way for us to route this particular issue through RequestPermissions. RequestPermissions is tied to blink::PermissionType inside the Chromium browser engine. window.open does not go through that code path at all. :(
|
|