mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +00:00
LibWeb: Skip anonymous layout nodes while finding the event target
This makes the links on nitter.net clickable, e.g. "preferences" in the upper right corner.
This commit is contained in:
parent
e7a7895114
commit
02186e2ee9
Notes:
sideshowbarker
2024-07-17 04:43:31 +09:00
Author: https://github.com/gunnarbeutner
Commit: 02186e2ee9
Pull-request: https://github.com/SerenityOS/serenity/pull/15770
1 changed files with 2 additions and 0 deletions
|
@ -39,6 +39,8 @@ static bool parent_element_for_event_dispatch(Painting::Paintable const& paintab
|
||||||
layout_node = &paintable.layout_node();
|
layout_node = &paintable.layout_node();
|
||||||
while (layout_node && node && !node->is_element() && layout_node->parent()) {
|
while (layout_node && node && !node->is_element() && layout_node->parent()) {
|
||||||
layout_node = layout_node->parent();
|
layout_node = layout_node->parent();
|
||||||
|
if (layout_node->is_anonymous())
|
||||||
|
continue;
|
||||||
node = layout_node->dom_node();
|
node = layout_node->dom_node();
|
||||||
}
|
}
|
||||||
return node && layout_node;
|
return node && layout_node;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue