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

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

Open
magreenblatt opened this issue May 9, 2020 · 4 comments
Open

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

magreenblatt opened this issue May 9, 2020 · 4 comments
Labels
bug Bug report Framework Related to framework code or APIs has fix A fix has been proposed

Comments

@magreenblatt
Copy link
Collaborator

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
Copy link
Collaborator Author

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


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

@magreenblatt
Copy link
Collaborator Author

  • changed component from "Unclassified" to "Framework-HasFix"

@HappyPepi
Copy link

HappyPepi commented Sep 23, 2024

Hi,
Yesterday i found this issue, which would explain the current behavior of our app, that we can open the new window/popup but cant bring the popup to the front again as soon as the focus was changed to the opener.

@magreenblatt Are there any updates or recommended Workarounds for this behavior? :)

@dbuechel
Copy link

dbuechel commented Oct 10, 2024

We're having the exact same issue (using CefSharp in a .NET application), any help or recommendations would be much appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug report Framework Related to framework code or APIs has fix A fix has been proposed
Projects
None yet
Development

No branches or pull requests

3 participants