this is missing some information regarding what exactly you want to do, so after reading what you describe, my guess is you want to prevent the event when you finish the dragging, so this can be either at the start or at the end, which I think you want the one at the end. I tried to reproduce your issue having two divs one on the Y axis and the other on the X axis like this:
JS
<div class="dragYAxis"></div>
<div class="dragXAxis"></div>
CSS
body {
background: #20262E;
padding: 20px;
}
.dragXAxis{
height: 20px;
width: 20px;
background: grey;
}
.dragYAxis{
height: 20px;
width: 20px;
background: white;
}
JS
/*
Try this solution for your problem and see if it helps too:
$('.dragYAxis').draggable({
axis: 'y',
start: function(event, ui) {
ui.helper.bind("click.prevent",
function(event) { event.preventDefault(); });
},
stop: function(event, ui) {
setTimeout(function(){ui.helper.unbind("click.prevent");}, 300);
}
});*/
$(".dragYAxis").draggable({axis: 'y'});
$(".dragXAxis").draggable({axis: 'x'});
$(".dragYAxis").click(function(){
alert();
});
$(".dragXAxis").click(function(){
alert();
});
But no double event was made in the releasing of one event on top of another event that also has the draggable, and also has a simple click event.
Can you maybe do your own fiddle and try to reproduce the problem? Other wise you could try to look for some similar solution in this guys prevent event solution:
Preventing click event with jQuery drag and drop
Link to JS fiddle:
https://jsfiddle.net/kn30mLpd/