WebView2Feedback icon indicating copy to clipboard operation
WebView2Feedback copied to clipboard

[Problem/Bug]: ShowSaveAsUI don't work with custom scheme

Open jls28 opened this issue 7 months ago • 5 comments

What happened?

I am using a custom scheme to display a simple html page via WebResourceRequested/IStream/CreateWebResourceResponse/put_Response.

The first problem : the "Save as" command is not available from the context menu (same thing happen with the webview2APIsample -> scenario navigate to custom scheme via webResourceRequested).

Second problem : ShowSaveAsUI create a file BUT immediatly delete it (same thing happen with the webview2APIsample -> navigate to custom scheme via webResourceRequested).

Importance

Moderate. My app's user experience is affected, but still usable.

Runtime Channel

Stable release (WebView2 Runtime)

Runtime Version

134.0.3124.93

SDK Version

1.0.2739.15

Framework

Win32

Operating System

Windows 10

OS Version

19045.4412

Repro steps

webview2APIsample -> navigate to custom scheme via webResourceRequested

Repros in Edge Browser

No, issue does not reproduce in the corresponding Edge version

Regression

No, this never worked

Last working version (if regression)

No response

jls28 avatar May 02 '25 12:05 jls28

@jls28 Please share a minimal example to understand the problem.

ParadoxZero avatar May 06 '25 02:05 ParadoxZero

@ParadoxZero The problem is that I use a custom scheme to display an internal generated html page and I would like save the page to a file but it is impossible because ShowSaveAsUI don't work and the "Save as" command is not available from the context menu.

It is similar to the Microsoft webview2APIsample -> scenario navigate to custom scheme via webResourceRequested :

step 1 : goto Scenario "navigate to custom scheme via webResourceRequested" this goto the page "wv2rocks://domain/ScenarioCustomScheme.html" step 2 : goto Scenario "Save As"/"Programmatic Save As" : this create a deleted file.

jls28 avatar May 06 '25 09:05 jls28

@jls28, thanks for the repro steps - let me get back to the thread once I understand it more.

ParadoxZero avatar May 07 '25 05:05 ParadoxZero

I have an update regarding this strange issue.

Previously, I was using an old UDF (User data folder), likely created with an outdated WV2 runtime version.

Today, I switched to a newly created UDF, and it behaves quite differently.

Interestingly, the problem no longer occurs with this new UDF.

Also I remarked one other problem with the old "User data folder", the autosave password option don't work very well.

jls28 avatar Aug 21 '25 14:08 jls28

This is definitely an old profile issue.

  • When using a profile created over a year ago, the problem persists.
  • Creating a new user data folder with a fresh default profile resolves the issue.
  • However, if the new default profile is replaced with the old one, the problem returns.

jls28 avatar Aug 23 '25 10:08 jls28