Skip to content

BrowserWindow size changed on its own #15816

Closed

Description

@heretic13
  • Output of node_modules/.bin/electron --version: v3.0.10
  • Operating System (Platform and Version): Windows 10 x64 (1803 17134.345)
  • Output of node_modules/.bin/electron --version on last known working Electron version (if applicable):
    v3.0.10
    Expected Behavior
    I would like to see the window move across the screen.

Actual behavior
The window moves around the screen. But first, the height of the window decreases.

To Reproduce
Write simple program that contains code:
mainWindow = new BrowserWindow({ width: 370, height: 270, x: 100, y: 100, resizable: false, });
Start app. Grab the window with the mouse for its title and drag across the screen.

Additional Information
This error occurs when explicitly specifying the x, y coordinates of the window and the option "resizable: false".

Activity

  1. welcome commented on Nov 23, 2018

    @welcome

    👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

    To help make it easier for us to investigate your issue, please follow the contributing guidelines.

  2. changed the title [-]BrowserWindow size changed changes on its own[/-] [+]BrowserWindow size changed on its own[/+] on Nov 23, 2018
  3. heretic13 commented on Nov 28, 2018

    @heretic13
    Author

    Another way to reproduce the error.

    Sample code:
    mainWindow = new BrowserWindow({ width: 370, height: 250, resizable: false, }) mainWindow.loadURL('https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table');
    After loading the page, press the minimize box. Then click on the program icon on the taskbar at the bottom of the screen. The program window appears on the screen, but its height is reduced.

  4. heretic13 commented on Nov 28, 2018

    @heretic13
    Author

    Update.

    Each operation of minimizing and maximizing the window reduces its height.
    Do a couple of dozen operations and even a large window turn into a strip.

  5. self-assigned this
    on Nov 28, 2018
  6. added
    status/confirmed
    on Nov 28, 2018
  7. roblade commented on Oct 29, 2021

    @roblade

    you can use "win.setContentSize(size.width,size.height)" instead of "win.setSize()";

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

3-0-x4-2-xbug 🪲platform/windowsstatus/confirmed

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions