Browse Source

fix: Ignore `-webkit-app-region: drag;` when window is in full screen mode. (#41331)

fix: Ignore `-webkit-app-region: drag;` when window is in full screen mode. (#41307)

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Mikhail Leliakin <[email protected]>
trop[bot] 1 year ago
parent
commit
2c152014c4
1 changed files with 5 additions and 0 deletions
  1. 5 0
      shell/browser/native_window.cc

+ 5 - 0
shell/browser/native_window.cc

@@ -761,6 +761,11 @@ int NativeWindow::NonClientHitTest(const gfx::Point& point) {
   }
 #endif
 
+  // This is to disable dragging in HTML5 full screen mode.
+  // Details: https://github.com/electron/electron/issues/41002
+  if (GetWidget()->IsFullscreen())
+    return HTNOWHERE;
+
   for (auto* provider : draggable_region_providers_) {
     int hit = provider->NonClientHitTest(point);
     if (hit != HTNOWHERE)