[Bug]: Area where traffic lights is rendered does not receive click events when app is fullscreened with titlebar hidden on macOS #39885
Labels
26-x-y
27-x-y
bug 🪲
has-repro-gist
Issue can be reproduced with code at https://gist.github.com/
platform/macOS
Preflight Checklist
Electron Version
26.1.0
What operating system are you using?
macOS
Operating System Version
macOS Ventura 13.5.2
What arch are you using?
arm64 (including Apple Silicon)
Last Known Working Electron version
N/A
Expected Behavior
Hi there! Apologies if there is already an opened issue for this, I tried to look in the repo but could not find anything relevant.
As the title suggests, we're currently experiencing an issue in our Mac app, which uses a hidden titlebar and therefore renders the traffic lights inline in our app's header alongside clickable elements such as buttons and popovers, where the leftmost buttons are no longer clickable when the app is maximized.
In debugging this, I realized that those buttons (which we have set up to replace the position of where the traffic lights were in the maximized state) do not receive click events at all (e.g. I can't select them from the Chromium inspector and setting a debugger for
onclick
events in the DOM yields nothing when I click that region.Other relevant information here is that our header which renders these buttons has
-webkit-app-region: drag
set (so it does not receive DOM click events as expected) but each individual button has-webkit-app-region: no-drag
set to allow them to be clickable and otherwise work just fine when the app is not maximized and the buttons have not been rendered where the traffic lights were in the un-maximized state.Actual Behavior
As described above, the relevant two leftmost buttons in our draggable header (which have
no-drag
set) are clickable when rendered next to the traffic lights while the app is not maximized but no longer receive click events when they replace the traffic lights at the edge of the window when it is maximized.See demo gif below:
Testcase Gist URL
https://gist.github.com/sergeichestakov/c84835f4d80182744b99e837268edc7c
Additional Information
Worth noting that we can only reproduce this so far in macOS Ventura (on an M1 Mac). We also tried macOS Big Sur (on an x86 Mac) but this bug does not reproduce there.
Also relevant, we initialize the BrowserWindow with the following options:
The text was updated successfully, but these errors were encountered: