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]: tray.getBounds()
initially returns the incorrect x
and y
values on macOS
#35984
Comments
Just to note: there's some additional details/investigation into the cause of this in #36031, which I closed as a duplicate of this issue. |
Looking forward to the fix |
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment! |
Still an issue. |
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment! |
bump |
@clavin Is there any update on this issue? I'm facing it too. Here's some information to help out with debugging: Expected Behaviour: Extended Context: I checked getting these bound values using System:
Values: trayIcon.getBounds() = { x: 0, y: 900, width: 32, height: 24 }
mainWindow.getBounds() = { x: 520, y: 287, width: 400, height: 327 }
app.isPackaged = false |
Preflight Checklist
Electron Version
21.1.0
What operating system are you using?
macOS
Operating System Version
12.6 (Monterey)
What arch are you using?
arm64 (including Apple Silicon)
Last Known Working Electron version
No response
Expected Behavior
tray.getBounds()
should return current bounds when called shortly after the initialisation of theTray
. If this is not possible then thetray
instance should emit aready
event so that we know whengetBounds()
will return the correct bounds.Actual Behavior
tray.getBounds()
returns an incorrect value until some arbitrary time has passed. In my testcase it takes approx 500ms for the correct value to be returned.Testcase Gist URL
https://gist.github.com/davej/be1503e76acb237fc2ef513445d80b70
Additional Information
Output of my test case above. Only
setTimeout:500
is correct.This is probably the same bug as reported in #33515.
The text was updated successfully, but these errors were encountered: