Skip to content

Commit

Permalink
fix: fix hover state not clear bug when BrowserWindow is not resizable (
Browse files Browse the repository at this point in the history
  • Loading branch information
sssooonnnggg committed Jun 16, 2021
1 parent 1373a03 commit f2fa32d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions shell/browser/ui/views/frameless_view.cc
Expand Up @@ -38,6 +38,13 @@ int FramelessView::ResizingBorderHitTest(const gfx::Point& point) {
bool can_ever_resize = frame_->widget_delegate()
? frame_->widget_delegate()->CanResize()
: false;

// https://github.com/electron/electron/issues/611
// If window isn't resizable, we should always return HTCLIENT, otherwise the
// hover state of DOM will not be cleared probably.
if (!can_ever_resize)
return HTCLIENT;

// Don't allow overlapping resize handles when the window is maximized or
// fullscreen, as it can't be resized in those states.
int resize_border = frame_->IsMaximized() || frame_->IsFullscreen()
Expand Down

0 comments on commit f2fa32d

Please sign in to comment.