mirror of
https://github.com/electron/electron.git
synced 2026-01-08 23:18:06 -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:
@@ -1273,6 +1273,16 @@ describe('chromium features', () => {
|
||||
});
|
||||
}
|
||||
|
||||
it('is always resizable', async () => {
|
||||
const w = new BrowserWindow({ show: false });
|
||||
w.loadFile(path.resolve(__dirname, 'fixtures', 'blank.html'));
|
||||
w.webContents.executeJavaScript(`
|
||||
{ b = window.open('about:blank', '', 'resizable=no,show=no'); null }
|
||||
`);
|
||||
const [, popup] = await once(app, 'browser-window-created') as [any, BrowserWindow];
|
||||
expect(popup.isResizable()).to.be.true();
|
||||
});
|
||||
|
||||
// FIXME(zcbenz): This test is making the spec runner hang on exit on Windows.
|
||||
ifit(process.platform !== 'win32')('disables node integration when it is disabled on the parent window', async () => {
|
||||
const windowUrl = url.pathToFileURL(path.join(fixturesPath, 'pages', 'window-opener-no-node-integration.html'));
|
||||
|
||||
Reference in New Issue
Block a user