# Moving mouse wheel during an active drag triggers a fake mouseDrag callback, but at a delayed position?

**URL:** <https://forum.juce.com/t/moving-mouse-wheel-during-an-active-drag-triggers-a-fake-mousedrag-callback-but-at-a-delayed-position/69761>\
**Category:** General JUCE discussion\
**Created:** [October 21, 2026, 11:53am UTC](https://forum.juce.com/t/moving-mouse-wheel-during-an-active-drag-triggers-a-fake-mousedrag-callback-but-at-a-delayed-position/69761 "2026-10-21T11:53:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ksum](https://avatars.discourse-cdn.com/v4/letter/k/919ad9/32.png) [@ksum](https://forum.juce.com/u/ksum)\
**Post date:** [October 21, 2026, 11:53am UTC](https://forum.juce.com/t/moving-mouse-wheel-during-an-active-drag-triggers-a-fake-mousedrag-callback-but-at-a-delayed-position/69761/1 "2026-10-21T11:53:10Z")

</div>

Hello!

Fairly new here, so please bear with me!

I noticed that whilst if I simultaneously scroll the mouse whilst mouse dragging (either left or right button down), the x and y position of the event seems to jump wildly. For example, here are some logged values in `juce::Component::mouseDrag`.

> mouseEvent.x = 243, mouseEvent.y=215  
> mouseEvent.x = 243, mouseEvent.y=215  
> mouseEvent.x = 463, mouseEvent.y=157 \<------ Sudden jump?  
> mouseEvent.x = 243, mouseEvent.y=215  
> mouseEvent.x = 463, mouseEvent.y=157 \<------ Another one?  
> mouseEvent.x = 243, mouseEvent.y=215

Digging into Juce a little bit, I think what’s happening is that when the mouse wheel is moved in the middle of a drag, `MouseInputSourceImpl::getTargetForGesture` seems to call `triggerFakeMove`, which I think triggers a fake `mouseDrag` . But this seems to be slightly delayed as `triggerFakeMove`is asynchronous?

This is awkward for us as we’d ideally like for the mouse wheel to not interfere with `mouseDrag`, and we do already have dedicated functionality for mouse wheel events in `mouseWheelMove`.

Is there best practice for handling this situation?

If relavant, I’m developing on MacOS.

Thanks!
