mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-27 10:00:24 +00:00
LibWeb: Add key code 'Esc' to ignored Keydown Events in EventHandler
This filters out the key code 'Esc' so it won't be printed to editable text nodes, e.g. text <input> elements.
This commit is contained in:
parent
8a168b2bc0
commit
fde9c1bfb2
Notes:
sideshowbarker
2024-07-17 18:30:04 +09:00
Author: https://github.com/kennethmyhra Commit: https://github.com/SerenityOS/serenity/commit/fde9c1bfb2 Pull-request: https://github.com/SerenityOS/serenity/pull/12669 Reviewed-by: https://github.com/awesomekling
1 changed files with 1 additions and 1 deletions
|
@ -439,7 +439,7 @@ bool EventHandler::focus_previous_element()
|
|||
constexpr bool should_ignore_keydown_event(u32 code_point)
|
||||
{
|
||||
// FIXME: There are probably also keys with non-zero code points that should be filtered out.
|
||||
return code_point == 0;
|
||||
return code_point == 0 || code_point == 27;
|
||||
}
|
||||
|
||||
bool EventHandler::handle_keydown(KeyCode key, unsigned modifiers, u32 code_point)
|
||||
|
|
Loading…
Reference in a new issue