gpui: Ensure hitbox is inserted when element has hover listener (#25981)
Currently, when an element has only a hover listener, the attached listener will never trigger, because within the check for whether a hitbox has to be inserted for the given element, this case it not considered. That leads to the behaviour as described in https://github.com/zed-industries/zed/pull/25602#discussion_r1970720972, where another event listener has to be attached to the element in order for the hover listener to work. This PR fixes the issue by ensuring that a hitbox is also inserted when only a hover listener is attached to the element. Release Notes: - N/A
This commit is contained in:
parent
922aaa0534
commit
c03bf1af36
1 changed files with 1 additions and 0 deletions
|
@ -1509,6 +1509,7 @@ impl Interactivity {
|
||||||
|| self.tracked_focus_handle.is_some()
|
|| self.tracked_focus_handle.is_some()
|
||||||
|| self.hover_style.is_some()
|
|| self.hover_style.is_some()
|
||||||
|| self.group_hover_style.is_some()
|
|| self.group_hover_style.is_some()
|
||||||
|
|| self.hover_listener.is_some()
|
||||||
|| !self.mouse_up_listeners.is_empty()
|
|| !self.mouse_up_listeners.is_empty()
|
||||||
|| !self.mouse_down_listeners.is_empty()
|
|| !self.mouse_down_listeners.is_empty()
|
||||||
|| !self.mouse_move_listeners.is_empty()
|
|| !self.mouse_move_listeners.is_empty()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue