summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb
diff options
context:
space:
mode:
authorKenneth Myhra <kennethmyhra@gmail.com>2022-02-19 22:22:45 +0100
committerAndreas Kling <kling@serenityos.org>2022-02-20 10:57:30 +0100
commitfde9c1bfb2e00cef2e0681a0ed03609696250e32 (patch)
tree075e9fd8e8970576006f0b27a56fb9831181c618 /Userland/Libraries/LibWeb
parent8a168b2bc001727f85c03cc39bdbb7996aa017a2 (diff)
downloadserenity-fde9c1bfb2e00cef2e0681a0ed03609696250e32.zip
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.
Diffstat (limited to 'Userland/Libraries/LibWeb')
-rw-r--r--Userland/Libraries/LibWeb/Page/EventHandler.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/Page/EventHandler.cpp b/Userland/Libraries/LibWeb/Page/EventHandler.cpp
index 5c19a40a40..e5c0f3abd4 100644
--- a/Userland/Libraries/LibWeb/Page/EventHandler.cpp
+++ b/Userland/Libraries/LibWeb/Page/EventHandler.cpp
@@ -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)