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
fix: properly determine if WebContents is offscreen in WebContentsDelegate #16329
Conversation
Interestingly, I'm seeing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unsure if there's a way to test for this, but it'd be awesome if there way 🤔
Release Notes Persisted
|
I have automatically backported this PR to "3-1-x", please check out #16341 |
I have automatically backported this PR to "4-0-x", please check out #16340 |
Confirmed that it is fixed on master and we see a sheet. Thanks @BinaryMuse @codebytere |
Description of Change
WebContentsDelegate::InitWithWebContents
previously used the following code to setoffscreen_
:However,
options::kOffscreen
defaults tofalse
when its not set, so whenweb_preferences
wasnull
,offscreen_
would be set totrue
. The most immediate result of this is thatRunModalDialog
would havesettings.force_detached
set in the following code, causing the dialog to be shown as a regular modal instead of a sheet:This change defaults
offscreen_
to false whenweb_preferences
isnull
./cc @VishwasShashidhar
Fixes #16300
Checklist
npm test
passesRelease Notes
Notes: Changed the file dialog presented by inputs with the type
file
to use sheets on macOS instead of detached modals.