We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bf9f6d4 commit 2dd7995Copy full SHA for 2dd7995
main/main.js
@@ -232,9 +232,12 @@ function createWindowWithBounds (bounds, customArgs) {
232
mainView.setBounds({x: 0, y: 0, width: bounds.width, height: bounds.height})
233
newWin.contentView.addChildView(mainView)
234
235
- newWin.on('resize', function() {
236
- const winBounds = newWin.getContentBounds()
237
- mainView.setBounds({x: 0, y: 0, width: winBounds.width, height: winBounds.height})
+ newWin.on('resize', function () {
+ // The result of getContentBounds doesn't update until the next tick
+ setTimeout(function () {
238
+ const winBounds = newWin.getContentBounds()
239
+ mainView.setBounds({x: 0, y: 0, width: winBounds.width, height: winBounds.height})
240
+ }, 0)
241
})
242
243
if (bounds.maximized) {
0 commit comments