electron: [Bug]: Can't Create BrowserWindow Larger Than Screen Width
Preflight Checklist
- I have read the Contributing Guidelines for this project.
- 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
17.0.0
What operating system are you using?
Windows
Operating System Version
Windows 10
What arch are you using?
x64
Last Known Working Electron version
No response
Expected Behavior
Creating a BrowserWindow
with width larger than the screen creates a window with the requested width.
Actual Behavior
Creating a BrowserWindow
with width larger than the screen creates a window where the width is clipped to the screen width.
Testcase Gist URL
https://gist.github.com/dsanders11/dbeb5222566ebe7f01dc72b93884202f
Additional Information
Setting the width to larger than the screen width after creating the window, using BrowserWindow.setSize
, does work. It should either also work from the BrowserWindow
constructor, or the documentation should mention that it doesn’t.
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 15 (9 by maintainers)
I think from user’s perspective,
enableLargerThanScreen: true
should be a clear sign that they want to be able to set the window to arbitrary size. So withenableLargerThanScreen: true
, setting size in constructor and callingsetSize
should both be able to set window size larger than screen.