mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
LibWeb: Don't always stop drawing scrollbar on mouseleave
PaintableBox::handle_mouseleave is turning off scrollbar updating, but the user might still have the primary button down to scroll. Don't turn it off if grabbing the thumb to scroll. Resolves crashing on MacOSX AppKit and Qt where gutter_size is 0 when mouse is moved outside window.
This commit is contained in:
parent
658477620a
commit
a60debe7bb
|
|
@ -1049,6 +1049,11 @@ Paintable::DispatchEventOfSameName PaintableBox::handle_mousemove(Badge<EventHan
|
|||
|
||||
void PaintableBox::handle_mouseleave(Badge<EventHandler>)
|
||||
{
|
||||
// FIXME: early return needed as MacOSX calls this even when user is pressing mouse button
|
||||
// https://github.com/LadybirdBrowser/ladybird/issues/5844
|
||||
if (m_scroll_thumb_dragging_direction.has_value())
|
||||
return;
|
||||
|
||||
auto previous_draw_enlarged_horizontal_scrollbar = m_draw_enlarged_horizontal_scrollbar;
|
||||
m_draw_enlarged_horizontal_scrollbar = false;
|
||||
if (previous_draw_enlarged_horizontal_scrollbar != m_draw_enlarged_horizontal_scrollbar)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user