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

DevTools, Network : "Open in new tab" opens two windows. #3735

Closed
HashidaTKS opened this issue Jul 10, 2024 · 2 comments
Closed

DevTools, Network : "Open in new tab" opens two windows. #3735

HashidaTKS opened this issue Jul 10, 2024 · 2 comments
Labels
bug Bug report

Comments

@HashidaTKS
Copy link
Contributor

HashidaTKS commented Jul 10, 2024

Describe the bug

When executing "Open in new tab" of DevTools's Network tab, two windows open.

image

image

One is a client application style window and the other is a Chromium style window.

We can reproduce it on cefclient v126 and v127 for Windows.

To Reproduce

We can reproduce it with cefclient.

  1. Download cef_binary_127.0.9+gd77d001+chromium-127.0.6533.17_windows32_beta_client.tar.bz2
  2. Execute cefclient.exe
  3. Open DevTools
  4. Open a Network tab
  5. Right click an item in a Name column
  6. Select "Open in new tab"

Expected behavior

Only a client application style window opens.

Screenshots

Added at Describe the bug.

Versions (please complete the following information):

  • OS: Windows 11
  • CEF Version: 126.2.10, 127.0.9

Additional context

Does the problem reproduce with the cefclient or cefsimple sample application at the same version?

Yes

Does the problem reproduce with Google Chrome at the same version?

No

@magreenblatt
Copy link
Collaborator

magreenblatt commented Jul 11, 2024

This is due to ClientHandler::OnOpenURLFromTab creating a new window in addition to the default Chrome behavior (DevToolsWindow::OpenInNewTab calls chrome::AddSelectedTabWithURL). We should try to disable the default behavior when OnOpenURLFromTab returns true.

@magreenblatt
Copy link
Collaborator

DevToolsWindow::OpenInNewTab calls chrome::AddSelectedTabWithURL

It looks like this case should not occur normally [1], so it should be safe to remove this fallback in DevToolsWindow.

[1] Browser::OpenURLFromTab will only return nullptr normally if the open is blocked by the popup blocker. However, that probably shouldn't trigger in this DevTools case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug report
Projects
None yet
Development

No branches or pull requests

2 participants