mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 02:18:12 +00:00
LibWeb: Fire a keypress event after firing a keydown event
In Google Docs with our user agent string, this is the event it listens for to insert characters into the document.
This commit is contained in:
parent
e4688fedd5
commit
11ede565a8
2 changed files with 7 additions and 1 deletions
|
@ -771,7 +771,12 @@ bool EventHandler::handle_keydown(KeyCode key, unsigned modifiers, u32 code_poin
|
|||
return true;
|
||||
}
|
||||
|
||||
return fire_keyboard_event(UIEvents::EventNames::keydown, m_browsing_context, key, modifiers, code_point);
|
||||
bool continue_ = fire_keyboard_event(UIEvents::EventNames::keydown, m_browsing_context, key, modifiers, code_point);
|
||||
if (!continue_)
|
||||
return false;
|
||||
|
||||
// FIXME: Work out and implement the difference between this and keydown.
|
||||
return fire_keyboard_event(UIEvents::EventNames::keypress, m_browsing_context, key, modifiers, code_point);
|
||||
}
|
||||
|
||||
bool EventHandler::handle_keyup(KeyCode key, unsigned modifiers, u32 code_point)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue