-
Notifications
You must be signed in to change notification settings - Fork 15k
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: check for draggable regions outside of main frame #41377
Conversation
Release Notes Persisted
|
I was unable to backport this PR to "29-x-y" cleanly; |
@VerteDinde has manually backported this PR to "29-x-y", please check out #41388 |
// In Chrome, app regions are only supported in the main frame. | ||
// However, we need to support draggable regions on other | ||
// local frames/windows, so extend support beyond the main frame. | ||
render_frame_->GetWebView()->SetSupportsAppRegion(true); |
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.
Reason for excluding child frames was devtools inspect gets broken, refs https://electronhq.slack.com/archives/CB6CG54DB/p1705578798763399?thread_ts=1705578659.730389&cid=CB6CG54DB. Please check if inspect continues to work with this change.
/cc @marekharanczyk
Description of Change
Fixes #41212
Fixes a bug introduced by crrev.com/c/4814003, where draggable regions on local frames (set using the app-region CSS property) are no longer automatically set and calculated unless an app uses a Window Controls Overlay or is Borderless. In the upstream CL, the change assumes that the local frame is a browser tab, and doesn't need draggable regions calculated; on Electron's side, we can't make that assumption.
This PR modifies the check to
SetSupportsAppRegion()
to also check for frames outside of the main frame.Checklist
npm test
passesRelease Notes
Notes: Fixed an issue where the
-webkit-app-region: drag
property was not respected on some windows.