MicrosoftEdge / MicrosoftEdge/WebView2Feedback

[Problem/Bug]: SourceChanged event is missing in a specific scenario

Open
#5,489 0 comments 0 reactions 1 assignee View on GitHub

@prija-microsoft is already working on this.

Since May 21, 2026.

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

Description

The SourceChanged event is missing in a specific scenario.

When navigating to https://en.wikipedia.org from https://en.wikipedia.org/wiki/Main_Page,
no SourceChanged event is raised.
This is likely because https://en.wikipedia.org is immediately redirected to https://en.wikipedia.org/wiki/Main_Page.

But is this behavior actually correct?

I’m not convinced. It causes issues in my application, and it even affects one of the official WebView2 samples.
For example, in the official WebView2APISample:

  • If I navigate from about:blank to https://en.wikipedia.org,
    the sample displays the URL as https://en.wikipedia.org/wiki/Main_Page,
    because a SourceChanged event is raised (and this URL is correct).

  • However, if I then use the address bar to navigate again to https://en.wikipedia.org (from the previous page
    https://en.wikipedia.org/wiki/Main_Page), the sample displays the URL as https://en.wikipedia.org
    because no SourceChanged event is raised in this specific case.
    But this displayed URL is incorrect — the actual location.href (checked via JavaScript) is still
    https://en.wikipedia.org/wiki/Main_Page because of the redirection.

This problem is not limited to Wikipedia;
I think many other URLs that perform a redirection are affected :
https://msdn.microsoft.com/magazine/jj618294.aspx
https://google.com
https://httpbin.org/redirect-to?url=https://example.com
https://developer.mozilla.org
...

msEdge is not affected by this problem.

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.