mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-27 12:46:06 +00:00
LibCore: Don't auto-accept events that hit bubbling limit
We were using the "accept" flag on the event to break out of the bubbling loop, but this had lasting consequences since all events that bubbled too far came out looking as if someone had accepted them. If an event is ignored by everyone, it should appear ignored.
This commit is contained in:
parent
094b47971b
commit
dbd090fd95
Notes:
sideshowbarker
2024-07-19 00:01:42 +09:00
Author: https://github.com/awesomekling
Commit: dbd090fd95
1 changed files with 1 additions and 2 deletions
|
@ -231,8 +231,7 @@ void Object::dispatch_event(Core::Event& e, Object* stay_within)
|
|||
target = target->parent();
|
||||
if (target == stay_within) {
|
||||
// Prevent the event from bubbling any further.
|
||||
e.accept();
|
||||
break;
|
||||
return;
|
||||
}
|
||||
} while (target && !e.is_accepted());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue