Fix bug in drag move dispatch

Mikayla and conrad created

co-authored-by: conrad <conrad@zed.dev>

Change summary

crates/gpui2/src/elements/div.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Detailed changes

crates/gpui2/src/elements/div.rs 🔗

@@ -213,7 +213,7 @@ pub trait InteractiveElement: Sized {
         listener: impl Fn(&DragMoveEvent<T>, &mut WindowContext) + 'static,
     ) -> Self
     where
-        T: Render,
+        T: 'static,
     {
         self.interactivity().mouse_move_listeners.push(Box::new(
             move |event, bounds, phase, cx| {
@@ -223,7 +223,7 @@ pub trait InteractiveElement: Sized {
                     if cx
                         .active_drag
                         .as_ref()
-                        .is_some_and(|drag| drag.value.type_id() == TypeId::of::<T>())
+                        .is_some_and(|drag| (*drag.value).type_id() == TypeId::of::<T>())
                     {
                         (listener)(
                             &DragMoveEvent {