mirror of
https://github.com/electron/electron.git
synced 2026-05-02 03:00:22 -04:00
fix: ignore draggable regions in hidden WebContentsView (#51245)
fix: ignore draggable regions in hidden WebContentsView Hidden child WebContentsViews were still contributing their draggable regions to the parent window's non-client hit test, so clicks in the area where a hidden view's draggable element would render still dragged the window. Early-return HTNOWHERE when the view is not visible. Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
@@ -82,6 +82,8 @@ void WebContentsView::ApplyBorderRadius() {
|
||||
}
|
||||
|
||||
int WebContentsView::NonClientHitTest(const gfx::Point& point) {
|
||||
if (!view() || !view()->GetVisible())
|
||||
return HTNOWHERE;
|
||||
if (api_web_contents_) {
|
||||
auto* iwc = api_web_contents_->inspectable_web_contents();
|
||||
if (!iwc)
|
||||
|
||||
Reference in New Issue
Block a user