mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-24 11:01:54 +00:00
address issue where mouse down events weren't getting captured after the multiple handlers change
This commit is contained in:
parent
6b1e9c185a
commit
845fb390b7
1 changed files with 3 additions and 1 deletions
|
@ -485,7 +485,7 @@ impl Presenter {
|
||||||
}
|
}
|
||||||
|
|
||||||
// `event_consumed` should only be true if there are any handlers for this event.
|
// `event_consumed` should only be true if there are any handlers for this event.
|
||||||
let mut event_consumed = false;
|
let mut event_consumed = event_cx.handled;
|
||||||
if let Some(callbacks) = valid_region.handlers.get(&mouse_event.handler_key()) {
|
if let Some(callbacks) = valid_region.handlers.get(&mouse_event.handler_key()) {
|
||||||
event_consumed = true;
|
event_consumed = true;
|
||||||
for callback in callbacks {
|
for callback in callbacks {
|
||||||
|
@ -499,6 +499,8 @@ impl Presenter {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
any_event_handled |= event_cx.handled;
|
||||||
|
|
||||||
// For bubbling events, if the event was handled, don't continue dispatching.
|
// For bubbling events, if the event was handled, don't continue dispatching.
|
||||||
// This only makes sense for local events which return false from is_capturable.
|
// This only makes sense for local events which return false from is_capturable.
|
||||||
if event_consumed && mouse_event.is_capturable() {
|
if event_consumed && mouse_event.is_capturable() {
|
||||||
|
|
Loading…
Reference in a new issue