2022-07-08, 22:47:48
Hi,
Based on our earlier emails, I assume that you are talking about using the context menu option "Save Image as" when selecting an image.
As I mentioned, I was surprised that it even went through the OnDownloadStarting event.
When you click on a link that initiates a download operation, you can override the "save as" dialog by setting the "Handled" parameter to true.
This does not seem to work for your "Save Image as" scenario.
The difference between showing a "save as" dialog and not appears to be due to starting the app with administrator privileges. Which is a WebView2 bug that Microsoft is tracking here:
https://github.com/MicrosoftEdge/WebView...issues/802
As I was pretty sure that this is not a AntView issue itself I just spent some time and reproduced your issue in .net with the WebView2 control from Microsoft.
When I debug it there, the "save as" dialog is actually popped up before it hits the event. Which explains that you can't set anything in the event. It looks like that we're going to have to ask Microsoft is this is by design or if it was missed.
There's a contextmenu API which might help (adding your own "save as" option), but it isn't available yet in the C++ SDK we're currently building against.
I also see some debate here, but I doubt it is useful.
https://github.com/MicrosoftEdge/WebView...ssues/1090
Sorry don't have a satisfying answer on this one yet.
--
Wil
Based on our earlier emails, I assume that you are talking about using the context menu option "Save Image as" when selecting an image.
As I mentioned, I was surprised that it even went through the OnDownloadStarting event.
When you click on a link that initiates a download operation, you can override the "save as" dialog by setting the "Handled" parameter to true.
This does not seem to work for your "Save Image as" scenario.
The difference between showing a "save as" dialog and not appears to be due to starting the app with administrator privileges. Which is a WebView2 bug that Microsoft is tracking here:
https://github.com/MicrosoftEdge/WebView...issues/802
As I was pretty sure that this is not a AntView issue itself I just spent some time and reproduced your issue in .net with the WebView2 control from Microsoft.
When I debug it there, the "save as" dialog is actually popped up before it hits the event. Which explains that you can't set anything in the event. It looks like that we're going to have to ask Microsoft is this is by design or if it was missed.
There's a contextmenu API which might help (adding your own "save as" option), but it isn't available yet in the C++ SDK we're currently building against.
I also see some debate here, but I doubt it is useful.
https://github.com/MicrosoftEdge/WebView...ssues/1090
Sorry don't have a satisfying answer on this one yet.
--
Wil