mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-24 18:02:20 +00:00
LibWeb: Remember last focus trigger in Document
We will need this to implement focus indication.
This commit is contained in:
parent
e4586abc18
commit
7016921067
Notes:
github-actions[bot]
2025-06-13 15:40:30 +00:00
Author: https://github.com/gmta
Commit: 7016921067
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5074
5 changed files with 20 additions and 4 deletions
|
@ -679,7 +679,7 @@ EventResult EventHandler::handle_mousedown(CSSPixelPoint viewport_position, CSSP
|
|||
// When a user activates a click focusable focusable area, the user agent must run the focusing steps on the focusable area with focus trigger set to "click".
|
||||
// Spec Note: Note that focusing is not an activation behavior, i.e. calling the click() method on an element or dispatching a synthetic click event on it won't cause the element to get focused.
|
||||
if (focus_candidate)
|
||||
HTML::run_focusing_steps(focus_candidate, nullptr, "click"sv);
|
||||
HTML::run_focusing_steps(focus_candidate, nullptr, HTML::FocusTrigger::Click);
|
||||
else if (auto* focused_element = document->focused_element())
|
||||
HTML::run_unfocusing_steps(focused_element);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue