mirror of
https://github.com/RGBCube/serenity
synced 2025-07-23 16:47:41 +00:00
LibWeb: Ignore keydown events when there is no layout tree
This commit is contained in:
parent
d69133e4ac
commit
5514f41f25
1 changed files with 3 additions and 0 deletions
|
@ -395,6 +395,9 @@ bool EventHandler::handle_keydown(KeyCode key, unsigned modifiers, u32 code_poin
|
||||||
return focus_next_element();
|
return focus_next_element();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!layout_root())
|
||||||
|
return false;
|
||||||
|
|
||||||
if (layout_root()->selection().is_valid()) {
|
if (layout_root()->selection().is_valid()) {
|
||||||
auto range = layout_root()->selection().to_dom_range()->normalized();
|
auto range = layout_root()->selection().to_dom_range()->normalized();
|
||||||
if (range->start_container()->is_editable()) {
|
if (range->start_container()->is_editable()) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue