chromiumembedded / cef

Chromium Embedded Framework (CEF). A simple framework for embedding Chromium-based browsers in other applications.
https://bitbucket.org/chromiumembedded/cef/
Other
3.1k stars 451 forks source link

window.focus() does not bring the window to the front #2931

Open magreenblatt opened 4 years ago

magreenblatt commented 4 years ago

Original report by Andy Tzeng (Bitbucket: andytzeng, GitHub: andytzeng).


What steps will reproduce the problem?

  1. Open a popup window with the same origin of the opener window. (e.g. “var w = window.open(location)”)
  2. After popup window shown, change focus to opener (bring opener window to the front)
  3. Execute the javascript “w.focus()” from opener window to activate popup window

What is the expected output? What do you see instead?

it is expected the popup window can be brought to the front. But, current build has no response.

What version of the product are you using? On what operating system?

CEF 81.3.2+gb9282cc+chromium-81.0.4044.138 on Windows/Mac

Does the problem reproduce with the cefclient or cefsimple sample application at the same version? How about with a newer or older version?

cefclient/cefsample has the issue on every maintained version

Does the problem reproduce with Google Chrome at the same version? How about with a newer or older version?

Google Chrome works well. The 80+ version I tested work as expected.

Based on the spec, it should be able to bring the window to the front. I’ve prepared the PR for the issue.

magreenblatt commented 4 years ago

Original comment by Andy Tzeng (Bitbucket: andytzeng, GitHub: andytzeng).


Here is the PR: https://bitbucket.org/chromiumembedded/cef/pull-requests/315

magreenblatt commented 4 years ago