Description
When I have a frameless resizeable window with min-width
and min-height
set, the width and height increases after returning from maximize. The width increases by 6 px while the height increases by 8 px.
How to reconstruct:
- Create a window using:
new BrowserWindow({
'frame': false,
'resizable': true,
'width': 1020,
'height': 720,
'min-width': 1000,
'min-height': 700,
});
- Open the devtools.
- When you start the program you should see something like this (1020x720):
- Resize the window to it's minimum size (1000x700):
- Maximize the window using
WinKey+Up
(for me this was 1924x1042 which is already weird because the screen size is 1920x1080 so the width already has 4 extra pixels):
- Unmaximize using
WinKey+Down
(100_6_x70_8_):
If you skip the 4th step (resize to minimum), the size still changes but from my experiments it seems only the height will increase (it increases by 8 pixels).
If I do the same without setting min-width
and min-height
it seems to work as expected (returns to the same size).
In an app I'm working on, there are a couple of scenarios when I open an iframe that is set to the minimum size. It looks good in the initial state and in the maximize state, but once I unmaximize the window instead of returning to it's last size, it has this extra pixels that show up around the iframe.
I tested it with Windows 8.1 64 bit using Electron v0.30.4.