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]: BrowserView setBounds behavior inconsistent between Mac and Windows #35994
Comments
🎉 FYI, this may partially fix this issue #35995 |
@nornagon it behaves the same (arguably incorrect) way on Windows as it used to on macOS - i believe the solution here is to bring Windows in line with macOS rather than revert the change on Windows. From the original issue:
This same issue happens on Windows (which I missed). |
hm... i'm not sure? I don't feel like y=0 should put the browserview underneath the titlebar. also, it's a breaking change because everyone who uses browserview would need to update their code to avoid their app breaking. |
Hi, have there been any further developments with regards to this? |
I also think this is a breaking change introduced in the bugfix release v19.0.15: v19.0.14...v19.0.15#diff-c540c2e05740fa476322f2d34ffc1db3d9e85d8419aa14556af6e97bad2a3611R262 |
Here's a hacky solution to normalize the function getAdjustedY(win: BrowserWindow, y = 0) {
const winHeight = win.getSize()[1];
const contentHeight = win.getContentSize()[1];
const titlebarHeight = winHeight - contentHeight;
return process.platform === "darwin" ? titlebarHeight + y : y;
} |
Still seeing this in Electron 23. Ty for the fix @davej, gonna try it out. Update: The fix worked as expected! |
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. |
gives different results on different platforms:
mac:
windows:
Regressed in #34713 I believe. cc @codebytere
The text was updated successfully, but these errors were encountered: