From 2c5c815f44676d9d0882c24c235f5ec528198300 Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Sun, 2 Jul 2023 22:25:25 -0700 Subject: [PATCH] LibWeb: Toggle media playback when clicking anywhere on the control box Feels nicer to click anywhere on the control box to toggle playback, rather than needing to accurately click the playback button. Note this does not affect other behavior-specific buttons; i.e. if the mute button is pressed, we won't reach the playback toggle.. --- Userland/Libraries/LibWeb/Painting/MediaPaintable.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/Painting/MediaPaintable.cpp b/Userland/Libraries/LibWeb/Painting/MediaPaintable.cpp index a8d423d9cc..25ee5cd129 100644 --- a/Userland/Libraries/LibWeb/Painting/MediaPaintable.cpp +++ b/Userland/Libraries/LibWeb/Painting/MediaPaintable.cpp @@ -321,7 +321,8 @@ MediaPaintable::DispatchEventOfSameName MediaPaintable::handle_mouseup(Badgecontains(position)) + return DispatchEventOfSameName::No; } media_element.toggle_playback().release_value_but_fixme_should_propagate_errors();