WebView2Feedback icon indicating copy to clipboard operation
WebView2Feedback copied to clipboard

Bug: Empty Referrer when opening link in new window

Open gkerenyi opened this issue 1 year ago • 3 comments

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:

  1. Modify, build and start the WebView2WpfBrowser sample app
  2. Visit https://duckduckgo.com/?q=what%27s+my+referrer
  3. 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

image

Open a link in a new window manually in Microsoft Edge

  1. Start Microsoft Edge
  2. Visit https://duckduckgo.com/?q=what%27s+my+referrer
  3. 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

image

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

AB#53005507

gkerenyi avatar Aug 01 '24 12:08 gkerenyi

✅ Successfully linked to Azure Boards work item(s):

champnic avatar Aug 02 '24 20:08 champnic

Thanks for reporting! I was able to reproduce it and added it to our backlog for further investigation.

JosephJin0815 avatar Aug 02 '24 20:08 JosephJin0815

Hi @JosephJin0815, thank you for checking the issue. Do you have an ETA for the fix?

gkerenyi avatar Aug 28 '24 09:08 gkerenyi