kswedberg/jquery-cluetip — Issue #79: Cluetip interferes with mousedown event on jqPlot
Author: abfabsabs
Created: 2012-02-10 18:26:54+00:00
State: open

Hello,

I'm facing a problem surrounding initializing a containing DIV as a cluetip when the inner DIV is initialized as a jqPlot object (http://www.jqplot.com/info.php). The jqPlot object contains event handlers for mousedown/mousemove/mouseup events, the combination of which results in the ability to click+drag inside the chart to zoom into the selected region. Wrapping the jqPlot div in a surrounding Cluetip seems to be preventing jqPlot from ever capturing the mousedown event.

Could you please assist either with a Cluetip code fix or a suggested workaround? I've narrowed it down to definitely something in the Cluetip that prevents it jqPlot from ever capturing the mousedown event. The jqPlot zoom functionality works fine when I comment out the code that initializes the Cluetip surrounding it.

Thank you so much,
-Sabrina Veksler

HTML snippet:

some tooltip data....

// initializes the surrounding cluetip
$('#tooltip_ScenarioChart_0').cluetip(
{ multiple: true, local: true, hideLocal: true, tracking: true, clickThrough: false, activation: 'hover', cursor: 'default', attribute: 'lang', titleAttribute: 'title', positionBy: 'mouse', topOffset: 0, leftOffset: 0 });

// initializes the inner jqPlot with zoom=true
$.jqplot('#currentScenarioChart_0', [grpData, adResponseData], {
series: [
{ renderer: $.jqplot.BarRenderer, shadow: false, xaxis: 'xaxis', yaxis: 'yaxis', fillAlpha: 0.2 },
{ xaxis: 'xaxis', yaxis: 'y2axis', color: '#EEEEEE', fill: true, fillAlpha: 0.2, rendererOptions: { highlightMouseOver: false} }
],
legend: { show: true, labels: ['GRPs', 'AdResponse'] },
axesDefaults: {
tickRenderer: $.jqplot.CanvasAxisTickRenderer,
tickOptions: { fontSize: '5pt' },
labelrenderer: $.jqplot.CanvasAxisLabelRenderer,
labelOptions: { fontSize: '7pt' }
},
axes: {
xaxis: {
........
},

yaxis: {
........
}
},

cursor: { show: true, zoom: true }
});