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]: Confirm/Alert popups break focus #41602

Closed
3 tasks done
LqdBcnAtWork opened this issue Mar 15, 2024 · 2 comments
Closed
3 tasks done

[Bug]: Confirm/Alert popups break focus #41602

LqdBcnAtWork opened this issue Mar 15, 2024 · 2 comments
Labels

Comments

@LqdBcnAtWork
Copy link

Preflight Checklist

Electron Version

29.1.4

What operating system are you using?

Windows

Operating System Version

Edition Windows 10 Home | Version 22H2OS build 19045.4170 Experience Windows Feature Experience Pack 1000.19054.1000.0

What arch are you using?

x64

Last Known Working Electron version

No response

Expected Behavior

Using a popup (alert or confirm) then trying to focus an input element shouldn't cause issues.

Actual Behavior

When the application is launched, there are no problems interacting with an input element.

After clicking on a popup from confirm or alert, trying to focus the window that just caused the popup (namely an input element) will no longer work.

Focusing on another window and refocusing the window repairs the issue.

Testcase Gist URL

https://gist.github.com/LqdBcnAtWork/9af23d4faa33e74874cd08ffbc8e4ed6

Additional Information

I've noticed this issue for a while, but didn't catch onto the issue being caused by popups. I thought it was random and was caused by some strange interaction with focus that I was causing on my end. Having diagnosed the problem's cause, creating a Fiddle that could replicate it took seconds.

I mention this because it means the issue has existed for many major versions of Electron. How far back is unknown to me. But it goes at least as far back as version 21. I tried version 12.2.3 for fun with Fiddle and the problem persists.

I believe this is caused by the popup taking focus, but the window doesn't recognise that it gets focus back when the popup is closed. I also think this issue might be on Chromium's end. But I'm unsure since neither Chrome or Edge (the only other Chromium apps I have available to me) use the same kind of popup for alert or confirm or display this issue.

@codebytere
Copy link
Member

Issue opened twice: #41603

@codebytere codebytere closed this as not planned Won't fix, can't repro, duplicate, stale Mar 16, 2024
@LqdBcnAtWork
Copy link
Author

Issue opened twice: #41603

No idea how that happened. Didn't notice until I had left work as well.

@electron electron deleted a comment from sham601 Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants