mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-30 00:31:14 +00:00
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..
This commit is contained in:
parent
c2357a059e
commit
2c5c815f44
Notes:
sideshowbarker
2024-07-17 03:35:16 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/2c5c815f44 Pull-request: https://github.com/SerenityOS/serenity/pull/19771
|
@ -321,7 +321,8 @@ MediaPaintable::DispatchEventOfSameName MediaPaintable::handle_mouseup(Badge<Eve
|
|||
return DispatchEventOfSameName::Yes;
|
||||
}
|
||||
|
||||
return DispatchEventOfSameName::No;
|
||||
if (cached_layout_boxes.timeline_rect.has_value() && cached_layout_boxes.timeline_rect->contains(position))
|
||||
return DispatchEventOfSameName::No;
|
||||
}
|
||||
|
||||
media_element.toggle_playback().release_value_but_fixme_should_propagate_errors();
|
||||
|
|
Loading…
Reference in a new issue