Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion jquery.ui.touch-punch.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,17 @@

// Dispatch the simulated event to the target element
event.target.dispatchEvent(simulatedEvent);
var target = event.target;

// Dispatch the simulated event to the target element
if (simulatedType === 'mousemove') {
// Special handling for mouse move: fire on element at the current location instead:
var elementAtPoint = document.elementFromPoint(event.clientX, event.clientY);
if (elementAtPoint !== null) {
target = elementAtPoint;
}
}
target.dispatchEvent(simulatedEvent);
}

/**
Expand Down Expand Up @@ -177,4 +188,4 @@
_mouseDestroy.call(self);
};

})(jQuery);
})(jQuery);