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]: setBounds calls during will-resize are no longer applied when preventing the default resize #34599
Closed
3 tasks done
Labels
17-x-y
18-x-y
19-x-y
bug 🪲
bug/regression ↩️
A new version of Electron broke something
has-repro-gist
Issue can be reproduced with code at https://gist.github.com/
platform/windows
Comments
mlaurencin
added
platform/windows
has-repro-gist
Issue can be reproduced with code at https://gist.github.com/
17-x-y
18-x-y
19-x-y
labels
Jun 29, 2022
mesner
added a commit
to mesner/electron
that referenced
this issue
Jul 7, 2022
…e for preventDefault
2 tasks
schetle
pushed a commit
to schetle/electron
that referenced
this issue
Nov 3, 2022
…fault (electron#34843) fix: electron#34599 allow setsize to be called within a move or resize for preventDefault
khalwa
pushed a commit
to solarwindscloud/electron
that referenced
this issue
Feb 22, 2023
…fault (electron#34843) fix: electron#34599 allow setsize to be called within a move or resize for preventDefault
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
17-x-y
18-x-y
19-x-y
bug 🪲
bug/regression ↩️
A new version of Electron broke something
has-repro-gist
Issue can be reproduced with code at https://gist.github.com/
platform/windows
Preflight Checklist
Electron Version
17.4, 18, 19
What operating system are you using?
Windows
Operating System Version
Windows 10 Pro 21H1
What arch are you using?
x64
Last Known Working Electron version
17.3.1
Expected Behavior
Prior to version 17.4.0, it was possible to override the bounds received within will-resize event. While this ability is not explicitly documented, we rely on it for window management within our product.
Actual Behavior
The window no longer resizes when the will-resize event is prevented and we attempt to control the resize with setBounds.
Testcase Gist URL
https://gist.github.com/meredith-ciq/a7ad120e84bd028a3fbd26b8f61aa45c
Additional Information
This was caused during the changes from:
#33288
I believe the gate on is_resizing_ at the top of setBounds is preventing any ability to overwrite the bounds that come in during a will-resize event.
Our application currently overrides the native resize and does our own resize after modifying the window bounds. This has caused resize to break in recent electron versions as the intermediate setBounds calls during resize are not being applied. We have several aspects of window management that depend on having this level of control over resize:
I've also mentioned this issue in a related issue: #33897. The fix from that issue only had the effect of not applying the final setBounds in the resize action. In our case that causes the window to no longer resize instead of giving no visual indication that a resize was occurring until the corner or edge of the window was dropped. I did some testing with the gist in that issue on the latest electron and it appears the behavior only works when some of the native resize events are allowed through.
The text was updated successfully, but these errors were encountered: