mirror of
https://github.com/zed-industries/zed.git
synced 2024-10-24 07:32:51 +00:00
Fix stutter while dragging something over an element that stops event propagation (#10737)
~~This is extracted from #10643.~~ ~~It looks like the editor had a small optimization to drop events when hovering the gutter. This also happens while dragging a tab over the gutter, and causes some stuttering. Please correct me if this wasn't just a small optimization, but I could not derive a different reason for this code to exist.~~ The window was waiting for event propagation to update any drag. This change makes sure the drag always gets updated, which makes sure it will always be fluid, no matter if any element stops event propagation. Ty @as-cii for pointing me to a better solution! Release Notes: - Fixed issue where dragging tab over any element that stops event propagation would stutter
This commit is contained in:
parent
3273f5e404
commit
37e4f83a78
1 changed files with 1 additions and 1 deletions
|
@ -1299,7 +1299,7 @@ impl<'a> WindowContext<'a> {
|
|||
});
|
||||
self.window.rendered_frame.mouse_listeners = mouse_listeners;
|
||||
|
||||
if self.app.propagate_event && self.has_active_drag() {
|
||||
if self.has_active_drag() {
|
||||
if event.is::<MouseMoveEvent>() {
|
||||
// If this was a mouse move event, redraw the window so that the
|
||||
// active drag can follow the mouse cursor.
|
||||
|
|
Loading…
Reference in a new issue