MicrosoftEdge / MicrosoftEdge/WebView2Feedback

Launching an external or a custom URI scheme in a new window provided by `add_NewWindowRequested` does not work

Open
#3,583 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
PowerShell
Stars
526
Forks
67
PR merge metrics
No merged PRs in 30d

Description

Description
It is impossible to launch a URI scheme which is registered with the OS (external) or by WebView2's ICoreWebView2CustomSchemeRegistration (custom) and directed to a new window that is provided by add_NewWindowRequested. A new window is opened but nothing happens. The invocation works if the pop-up window is handled by WebView2 itself. It doesn't matter if the scheme is called by window.open or an anchor with target '_blank'.

Version
SDK: 1.0.1823.32
Runtime: 114.0.1823.51
Framework: Win32
OS: Win10

Repro Steps
This can be reproduced in WebView2APISample. Obviously, an external scheme is needed but WebView2APISample's custom scheme "calculator://" suffices:

  1. Launch WebView2APISample.
  2. Open a console.
  3. Execute window.open("calculator://");. Executing window.location.href = "calculator://"; works as expected.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in WebView2APISample and trace the add_NewWindowRequested handling for window.open("calculator://") versus window.location.href. Reproduce the issue with the custom calculator:// scheme, then verify that a URI opened in the supplied new window launches successfully for both custom and external schemes.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.