mirror of
https://github.com/electron/electron.git
synced 2026-01-10 07:58:08 -05:00
fix: window.open popups are always resizable (#47540)
fix: window.open popups are always resizable Closes https://github.com/electron/electron/issues/43591. Per current WHATWG spec, the `window.open` API should always create a resizable popup window. This change updates the `parseFeaturesString` function to ensure that windows opened with `window.open` are always resizable, regardless of the `resizable` feature string.
This commit is contained in:
@@ -21,6 +21,23 @@ macOS 11 (Big Sur) is no longer supported by [Chromium](https://chromium-review.
|
||||
Older versions of Electron will continue to run on Big Sur, but macOS 12 (Monterey)
|
||||
or later will be required to run Electron v38.0.0 and higher.
|
||||
|
||||
### Behavior Changed: window.open popups are always resizable
|
||||
|
||||
Per current [WHATWG spec](https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-open-dev), the `window.open` API will now always create a resizable popup window.
|
||||
|
||||
To restore previous behavior:
|
||||
|
||||
```js
|
||||
webContents.setWindowOpenHandler((details) => {
|
||||
return {
|
||||
action: 'allow',
|
||||
overrideBrowserWindowOptions: {
|
||||
resizable: details.features.includes('resizable=yes')
|
||||
}
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
## Planned Breaking API Changes (37.0)
|
||||
|
||||
### Utility Process unhandled rejection behavior change
|
||||
|
||||
Reference in New Issue
Block a user