summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/Page
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibWeb/Page')
-rw-r--r--Userland/Libraries/LibWeb/Page/EventHandler.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/Page/EventHandler.cpp b/Userland/Libraries/LibWeb/Page/EventHandler.cpp
index 43322fff05..3fdcf84a90 100644
--- a/Userland/Libraries/LibWeb/Page/EventHandler.cpp
+++ b/Userland/Libraries/LibWeb/Page/EventHandler.cpp
@@ -395,6 +395,9 @@ bool EventHandler::handle_keydown(KeyCode key, unsigned modifiers, u32 code_poin
return focus_next_element();
}
+ if (!layout_root())
+ return false;
+
if (layout_root()->selection().is_valid()) {
auto range = layout_root()->selection().to_dom_range()->normalized();
if (range->start_container()->is_editable()) {