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]: Setting vibrancy on macOS breaks click events on WebContentsView in Electron 31 #42336

Open
3 tasks done
Hans-Halverson opened this issue May 31, 2024 · 0 comments
Open
3 tasks done
Assignees
Labels
31-x-y bug 🪲 component/WebContentsView has-repro-gist Issue can be reproduced with code at https://gist.github.com/ platform/macOS status/confirmed A maintainer reproduced the bug or agreed with the feature

Comments

@Hans-Halverson
Copy link

Preflight Checklist

Electron Version

31.0.0-beta.7

What operating system are you using?

macOS

Operating System Version

macOS Sonoma 14.4.1

What arch are you using?

arm64 (including Apple Silicon)

Last Known Working Electron version

29 (with BrowserViews), vibrancy is currently broken with a separate bug in 30

Expected Behavior

Click events on a WebContentsView should be detected when the BrowserWindow has vibrancy set on macOS. Depending on the version of Electron used for the attached gist, click events are either swallowed or cause the app to crash.

Actual Behavior

Click events on the WebContentsView are not registered (or potentially cause the app to crash). If I remove the vibrancy setting from the BrowserWindow then click events start working again.

In the attached gist you can see this by trying to click the red square, which should display an alert due to an onclick handler (and does display the alert when vibrancy is disabled).

Testcase Gist URL

https://gist.github.com/7f123c2282516503a73c7c0a43eb26d2

Additional Information

Like #42335, this issue also appears to trace back to this PR: #41326. The bug in the attached gist is first seen in v31.0.0-nightly.20240305, and is not seen in v31.0.0-nightly.20240304 (and the only PR in between is #41326).

However this is a bit more complicated because vibrancy still has this bug in v31.0.0-nightly.20240304 so the attached gist isn't functional, just for a different reason. I can confirm that if this potential fix for the vibrancy bug in Electron 30 is applied without #41326 then the click swallows/crashes in this issue are resolved.

When using a debug build I see that click events crash the app on this DCHECK with this stack trace

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
31-x-y bug 🪲 component/WebContentsView has-repro-gist Issue can be reproduced with code at https://gist.github.com/ platform/macOS status/confirmed A maintainer reproduced the bug or agreed with the feature
Projects
Status: 👍 Does Not Block Stable
Status: 🛑 Blocks Stable
Development

No branches or pull requests

3 participants