You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Frameless BrowserWindow.getBounds() inflates by resize-hit insets after setResizable(true → false) on Windows (regression in 41.2.1 from #50863) #51244
I agree to follow the Code of Conduct that this project adheres to.
I have searched the issue tracker for a bug report that matches the one I want to file, without success.
Electron Version
41.2.1, 41.2.2, 43.0.0-nightly.20260421
What operating system(s) are you using?
Windows
Operating System Version
Windows 11 Pro 10.0.26200, scaleFactor 1.375
What arch are you using?
x64
Last Known Working Electron version
41.2.0
Does the issue also appear in Chromium / Google Chrome?
I don't know how to test
Expected Behavior
On a frameless BrowserWindow, calling setResizable(false) should not change the values returned by getBounds() / getContentBounds(). The window's logical rect should remain equal to the rect passed to setBounds().
Actual Behavior
After setResizable(true → false) on a frameless window, getBounds() and getContentBounds() both report a rect inflated by the resize-hit insets introduced in #50863:
x: -8
width: +16 (8 left + 8 right)
height: +9 (0 top + 9 bottom)
The inflation is steady-state (persists indefinitely). getContentBounds() equals getBounds() at this point, so the expanded hit-target rect is being reported as both the window rect and the content rect rather than kept as a hit-test-only extension outside the window.
Bisect (same harness, same machine, scaleFactor 1.375):
Electron
t1 delta after setBounds
t2 delta after setResizable(false)
41.2.0
{x:0,y:0,w:0,h:1}
{x:0,y:0,w:0,h:1} ✅
41.2.1
{x:0,y:0,w:0,h:1}
{x:-8,y:0,w:16,h:9} ❌
41.2.2
{x:0,y:0,w:0,h:1}
{x:-8,y:0,w:16,h:9} ❌
43.0.0-nightly.20260421
{x:0,y:0,w:0,h:1}
{x:-8,y:0,w:16,h:9} ❌
The only change between 41.2.0 and 41.2.1 that touches this path is #50863.
Sample output (43.0.0-nightly.20260421):
t1 - after setBounds(requested)
requested : {"x":200,"y":200,"width":400,"height":300}
getBounds : {"x":200,"y":200,"width":400,"height":301}
delta : {"x":0,"y":0,"w":0,"h":1} <-- DPR rounding only
t2 - IMMEDIATELY after setResizable(false)
requested : {"x":200,"y":200,"width":400,"height":300}
getBounds : {"x":192,"y":200,"width":416,"height":309}
getContent : {"x":192,"y":200,"width":416,"height":309}
delta : {"x":-8,"y":0,"w":16,"h":9} <-- BUG
t3 - 50 ms later (inflation persists)
delta : {"x":-8,"y":0,"w":16,"h":9}
Activity
nikwen commentedon Apr 22, 2026
Thanks for reporting this issue, investigating it, and including a great repro!
Range: v41.2.0...v41.2.1