Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: BrowserView is not resized correctly on BrowserWindow resize #42501

Open
3 tasks done
staniel359 opened this issue Jun 14, 2024 · 4 comments
Open
3 tasks done

[Bug]: BrowserView is not resized correctly on BrowserWindow resize #42501

staniel359 opened this issue Jun 14, 2024 · 4 comments

Comments

@staniel359
Copy link

Preflight Checklist

Electron Version

31.0.1

What operating system are you using?

Ubuntu

Operating System Version

22.04

What arch are you using?

x64

Last Known Working Electron version

29.3.0

Expected Behavior

BrowserWindow's BrowserView should resize according to its parent.

Actual Behavior

Doesn't:
Screencast from 14-06-24 11:23:05.webm

Testcase Gist URL

No response

Additional Information

No response

@codebytere codebytere added the blocked/need-repro Needs a test case to reproduce the bug label Jun 14, 2024
@electron-issue-triage
Copy link

Hello @staniel359. Thanks for reporting this and helping to make Electron better!

Would it be possible for you to make a standalone testcase with only the code necessary to reproduce the issue? For example, Electron Fiddle is a great tool for making small test cases and makes it easy to publish your test case to a gist that Electron maintainers can use.

Stand-alone test cases make fixing issues go more smoothly: it ensure everyone's looking at the same issue, it removes all unnecessary variables from the equation, and it can also provide the basis for automated regression tests.

Now adding the blocked/need-repro Needs a test case to reproduce the bug label for this reason. After you make a test case, please link to it in a followup comment. This issue will be closed in 10 days if the above is not addressed.

@staniel359
Copy link
Author

Found out this issue was in BrowserView.setAutoResize() method.

Removed it and used resizing on BrowserWindow's resize event.

@electron-issue-triage electron-issue-triage bot removed the blocked/need-repro Needs a test case to reproduce the bug label Jun 16, 2024
@codebytere
Copy link
Member

codebytere commented Jun 17, 2024

@staniel359 to clarify - you think there's a bug in setAutoresize? or you realized you were incorrectly using the API? We still need a repro if you'd like us to proceed.

@staniel359
Copy link
Author

@codebytere setAutoResize had been working correctly until 29.3.0.
So I removed it and used the resize logic explicitly but as a workaround.

https://gist.github.com/staniel359/ef9af020415662b8069e265976910c30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 👍 Does Not Block Stable
Status: 👍 Does Not Block Stable
Development

No branches or pull requests

2 participants