Bug: Empty Referrer when opening link in new window #4722
Description
What happened?
When a link is opened in the same window or automatically in a new window (i.e. target="_blank"
), then the referrer will be available for the opened page, but if a link is opened in a new window manually (by using "Open in new window" from the context menu or Ctrl + clicking), then the referrer will be empty.
This behavior is not reproducible in Microsoft Edge, i.e. in that browser the referrer is available to the opened page when it is manually opened in a new tab/window.
The behavior is not reproducible with WebView2 if the link is opened with Shift+Click.
Importance
Important. My app's user experience is significantly compromised.
Runtime Channel
Stable release (WebView2 Runtime)
Runtime Version
No response
SDK Version
No response
Framework
WPF
Operating System
Windows 10, Windows 11
OS Version
No response
Repro steps
Open a link in a new window manually in WebView2WpfBrowser
For minimal repro I'm using the WebView2WpfBrowser sample app with the following change:
- MainWindow.xaml: remove
Source="https://www.bing.com/"
from the<wv2:WebView2>
tag.
Steps:
- Modify, build and start the WebView2WpfBrowser sample app
- Visit https://duckduckgo.com/?q=what%27s+my+referrer
- Ctrl + click the result that links to whatsmyreferer.com (or right-click it and select "Open link in new window")
Result: The reported referrer is blank
Open a link in a new window manually in Microsoft Edge
- Start Microsoft Edge
- Visit https://duckduckgo.com/?q=what%27s+my+referrer
- Ctrl + click the result that links to whatsmyreferer.com (or right-click it and select "Open link in new tab")
Result: The reported referrer is duckduckgo.com
Repros in Edge Browser
No, issue does not reproduce in the corresponding Edge version
Regression
Don't know
Last working version (if regression)
No response