highcharts / draggable-points

MIT License
32 stars 34 forks source link

highcharts draggable-points conflict between drag and click #15

Closed sebastianbochan closed 8 years ago

sebastianbochan commented 9 years ago

Related topic: http://stackoverflow.com/questions/26861680/highcharts-draggable-points-conflict-between-drag-and-click

jamiecoh commented 7 years ago

@TorsteinHonsi

This issue appears to have resurfaced. The simple step of also including customEvents.js plugin appear to stop the drag and drop events from firing (although visually it still works).

Examples:

A simple draggable-only chart: https://jsfiddle.net/o09s0a1a/1/ Simply also including the code for customEvents: https://jsfiddle.net/h5zwks1k/1/

The series will still drag, but the console output when dropped no longer occurs.

ajeantet commented 7 years ago

I confirm that this issue is back. Do you know how to solve it ?

ajeantet commented 7 years ago

Actually, things seem to be a bit more tricky : The conflict only involves elements which are within the Chart. In other words, if I try to trigger a click on an element anywhere outside of the chart on my page, it will work even if I've used the dragging. Conversely, if the div is part of the chart (for example it wraps a label) then using the drag and drop creates a conflict and it's no longer possible to fire a click event on the div. Here is an example : https://jsfiddle.net/AJeantet/pu561k76/10/

EDIT : the issue comes from the "chart.redraw()" function

ajeantet commented 7 years ago

A workaround is described here : https://stackoverflow.com/questions/45196140/highcharts-click-event-not-detected-after-a-redraw/45196641#45196641