Open
Description
What happened?
Hi,
this occurred in an externally developed app of ours.
here's the examplecode I used:
(Here it's a .bin-File but in our Application it is a .doc file, both fail.)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Download Resource and Open in New Tab</title>
</head>
<body>
<h1>Download and Open in New Tab Example</h1>
<a href="javascript:void(0)" onclick="openInNewTab()">Click me to open the resource in a new tab</a>
<script>
function openInNewTab() {
const url = "https://hil-speed.hetzner.com/100MB.bin";
const a = document.createElement('a');
a.href = url;
a.target = "_blank"; // Opens in a new tab
a.download = "100MB.bin"; // Suggests a filename for download
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
}
</script>
</body>
</html>
Thanks!
Importance
Important. My app's user experience is significantly compromised.
Runtime Channel
Stable release (WebView2 Runtime)
Runtime Version
135.0.3179.54
SDK Version
1.0.3230-prerelease
Framework
Winforms
Operating System
Windows 11
OS Version
22631.5039
Repro steps
- (Get an example website, if not already available)
- Open WV2 app
- Klick Download link
Expected: The page opens & closes automatically + downloads the file in some visible way
Actual: The page opens but nothing else seems to happen
Repros in Edge Browser
No, issue does not reproduce in the corresponding Edge version
Regression
Regression in newer Runtime
Last working version (if regression)
134.0.3124.93