mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-24 09:52:31 +00:00
LibWeb: Fix incorrect event handling with pseudo-elements
When a ::before or ::after pseudo-element covered an anchor element events were not successfully sent to the underlying anchor. This fix allows before and after pseudo-elements to be dispatched correctly. Fixes #5020
This commit is contained in:
parent
bd68a99f14
commit
836955ef57
Notes:
github-actions[bot]
2025-06-09 15:21:58 +00:00
Author: https://github.com/AmusedNetwork 🔰
Commit: 836955ef57
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5025
Reviewed-by: https://github.com/AtkinsSJ ✅
1 changed files with 3 additions and 1 deletions
|
@ -70,7 +70,9 @@ static DOM::Node* input_control_associated_with_ancestor_label_element(Painting:
|
|||
static bool parent_element_for_event_dispatch(Painting::Paintable& paintable, GC::Ptr<DOM::Node>& node, Layout::Node*& layout_node)
|
||||
{
|
||||
layout_node = &paintable.layout_node();
|
||||
if (layout_node->is_generated_for_backdrop_pseudo_element()) {
|
||||
if (layout_node->is_generated_for_backdrop_pseudo_element()
|
||||
|| layout_node->is_generated_for_after_pseudo_element()
|
||||
|| layout_node->is_generated_for_before_pseudo_element()) {
|
||||
node = layout_node->pseudo_element_generator();
|
||||
layout_node = node->layout_node();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue