LibWeb: Propagate non-primary mouse button clicks on video elements

Otherwise, returning "no" here will disallow the browser process from
showing a context menu, as the event handler will bail early.
This commit is contained in:
Timothy Flynn 2023-05-15 09:50:42 -04:00 committed by Andreas Kling
parent bcfa4a34a1
commit 5f473bcb5f
Notes: sideshowbarker 2024-07-17 04:49:48 +09:00

View file

@ -349,7 +349,7 @@ void VideoPaintable::paint_placeholder_video_controls(PaintContext& context, Dev
VideoPaintable::DispatchEventOfSameName VideoPaintable::handle_mouseup(Badge<EventHandler>, CSSPixelPoint position, unsigned button, unsigned)
{
if (button != GUI::MouseButton::Primary)
return DispatchEventOfSameName::No;
return DispatchEventOfSameName::Yes;
auto& video_element = layout_box().dom_node();
auto const& cached_layout_boxes = video_element.cached_layout_boxes({});