summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/HTML/HTMLElement.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-02-07 01:27:43 +0100
committerAndreas Kling <kling@serenityos.org>2022-02-07 01:29:01 +0100
commit086eb1ad7b36854be8ebe9388a2e8b88a61fd844 (patch)
tree1864eb7678154cc2e0088f9fec42f767c5e4692f /Userland/Libraries/LibWeb/HTML/HTMLElement.cpp
parentebfd296016cb6e533ee3dee25e32cc7e26e8b440 (diff)
downloadserenity-086eb1ad7b36854be8ebe9388a2e8b88a61fd844.zip
LibWeb: Fix inverted null check in run_focusing_steps()
Thanks to U9G for catching this! :^)
Diffstat (limited to 'Userland/Libraries/LibWeb/HTML/HTMLElement.cpp')
-rw-r--r--Userland/Libraries/LibWeb/HTML/HTMLElement.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/HTMLElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLElement.cpp
index fd77b0e57d..fa0a1efed9 100644
--- a/Userland/Libraries/LibWeb/HTML/HTMLElement.cpp
+++ b/Userland/Libraries/LibWeb/HTML/HTMLElement.cpp
@@ -346,7 +346,7 @@ static void run_focusing_steps(DOM::Node* new_focus_target, DOM::Node* fallback_
// FIXME: 4. If new focus target is a focusable area and its DOM anchor is inert, then return.
// 5. If new focus target is the currently focused area of a top-level browsing context, then return.
- if (new_focus_target->document().browsing_context())
+ if (!new_focus_target->document().browsing_context())
return;
auto& top_level_browsing_context = new_focus_target->document().browsing_context()->top_level_browsing_context();
if (new_focus_target == top_level_browsing_context.currently_focused_area())