mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-19 15:32:31 +00:00
LibWeb: Don't handle media player key events if any modifier is pressed
This commit is contained in:
parent
63231fd276
commit
a56a2faf51
Notes:
github-actions[bot]
2024-09-04 14:00:43 +00:00
Author: https://github.com/tcl3
Commit: a56a2faf51
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1273
Reviewed-by: https://github.com/trflynn89 ✅
3 changed files with 6 additions and 3 deletions
|
@ -1914,8 +1914,11 @@ void HTMLMediaElement::reject_pending_play_promises(ReadonlySpan<JS::NonnullGCPt
|
|||
WebIDL::reject_promise(realm, promise, error);
|
||||
}
|
||||
|
||||
WebIDL::ExceptionOr<bool> HTMLMediaElement::handle_keydown(Badge<Web::EventHandler>, UIEvents::KeyCode key)
|
||||
WebIDL::ExceptionOr<bool> HTMLMediaElement::handle_keydown(Badge<Web::EventHandler>, UIEvents::KeyCode key, u32 modifiers)
|
||||
{
|
||||
if (modifiers != UIEvents::KeyModifier::Mod_None)
|
||||
return false;
|
||||
|
||||
switch (key) {
|
||||
case UIEvents::KeyCode::Key_Space:
|
||||
TRY(toggle_playback());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue