Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Empty Referrer when opening link in new window #4722

Open
gkerenyi opened this issue Aug 1, 2024 · 3 comments
Open

Bug: Empty Referrer when opening link in new window #4722

gkerenyi opened this issue Aug 1, 2024 · 3 comments
Assignees
Labels
bug Something isn't working tracked We are tracking this work internally.

Comments

@gkerenyi
Copy link

gkerenyi commented Aug 1, 2024

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 gkerenyi added the bug Something isn't working label Aug 1, 2024
@JosephJin0815 JosephJin0815 added the tracked We are tracking this work internally. label Aug 2, 2024
@champnic
Copy link
Member

champnic commented Aug 2, 2024

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

@JosephJin0815
Copy link
Contributor

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

@gkerenyi
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tracked We are tracking this work internally.
Projects
None yet
Development

No branches or pull requests

3 participants