mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-18 23:12:02 +00:00
LibWeb: Ensure inert elements are unfocusable
This commit is contained in:
parent
a9ffc6359a
commit
1e691bd26d
Notes:
github-actions[bot]
2025-02-21 12:43:35 +00:00
Author: https://github.com/tcl3
Commit: 1e691bd26d
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3475
Reviewed-by: https://github.com/AtkinsSJ ✅
3 changed files with 96 additions and 2 deletions
|
@ -216,7 +216,9 @@ void run_focusing_steps(DOM::Node* new_focus_target, DOM::Node* fallback_target,
|
|||
new_focus_target = content_navigable->active_document();
|
||||
}
|
||||
|
||||
// FIXME: 4. If new focus target is a focusable area and its DOM anchor is inert, then return.
|
||||
// 4. If new focus target is a focusable area and its DOM anchor is inert, then return.
|
||||
if (new_focus_target->is_inert())
|
||||
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())
|
||||
|
@ -264,7 +266,9 @@ void run_unfocusing_steps(DOM::Node* old_focus_target)
|
|||
}
|
||||
}
|
||||
|
||||
// FIXME: 2. If old focus target is inert, then return.
|
||||
// 2. If old focus target is inert, then return.
|
||||
if (old_focus_target->is_inert())
|
||||
return;
|
||||
|
||||
// FIXME: 3. If old focus target is an area element and one of its shapes is the currently focused area of a
|
||||
// top-level browsing context, or, if old focus target is an element with one or more scrollable regions, and one
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue