Description
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
31.3.1
What operating system(s) are you using?
Windows
Operating System Version
Windows 11 22631.3958
What arch are you using?
x64
Last Known Working Electron version
No response
Expected Behavior
const win = new BaseWindow({ width: 800, height: 400 });
win.maximize();
const view1 = new WebContentsView();
win.contentView.addChildView(view1);
view1.setBackgroundColor('red');
view1.webContents.loadURL('https://electronjs.org');
view1.setBounds({ x: 0, y: 0, width: 1000, height: 1000 });
const view2 = new WebContentsView();
win.contentView.addChildView(view2);
view2.webContents.loadURL('https://github.com/electron/electron');
view2.setBounds({ x: 450, y: 450, width: 500, height: 1200 });
const view3 = new WebContentsView();
view1.addChildView(view3);
view3.webContents.loadURL('https://baidu.com');
view3.setBounds({ x: 50, y: 50, width: 1200, height: 500 });
view3 can be displayed normally in the parent view1
Actual Behavior
const win = new BaseWindow({ width: 800, height: 400 });
win.maximize();
const view1 = new WebContentsView();
win.contentView.addChildView(view1);
view1.setBackgroundColor('red');
view1.webContents.loadURL('https://electronjs.org');
view1.setBounds({ x: 0, y: 0, width: 1000, height: 1000 });
const view2 = new WebContentsView();
win.contentView.addChildView(view2);
view2.webContents.loadURL('https://github.com/electron/electron');
view2.setBounds({ x: 450, y: 450, width: 500, height: 1200 });
const view3 = new WebContentsView();
view1.addChildView(view3);
view3.webContents.loadURL('https://baidu.com');
view3.setBounds({ x: 50, y: 50, width: 1200, height: 500 });
In the above code, view3 is not displayed
Testcase Gist URL
No response
Additional Information
No response