sangltdn / flot

Automatically exported from code.google.com/p/flot
MIT License
0 stars 0 forks source link

Crosshair IE click event sometimes doesn't get called #272

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
How to replicate:

Use IE (I used IE8 to test this)
Use excanvas.js
Use crosshair plugin (I used "xy" mode but probably doesn't matter)
Set clickable = true
Handle plotclick event (alert something for example)

Most of clicks on graph don't get reported.
I figured out that if you click fast enough, it gets reported.
I also figured out if you remove redraw trigger from crosshair mouseout
event it gets reported.

So my guess is that click event is not handled when redrawing. We should
probably call other events before redrawing? Maybe it has something to do
with little mouse move (the same not handled when redrawing)

Original issue reported on code.google.com by mar...@mar.lt on 9 Dec 2009 at 12:10

GoogleCodeExporter commented 9 years ago
Quick fix to get you past this if it is holding you up.  
Found in another post, I also have the same problem and cant get around it.  
Seems to be something to do with the ecanvas as flashcanvas works.

      if (options.grid.clickable) {
        eventHolder.mousedown(onClick);
      }

Find that line in your flot.js file.  It will not be mousedown but click.
Switch it to mousedown and it seems to solve the problem.  Hopefully they come 
up with a better fix that we can replace this with later, but I can at least 
still use the component now.

Original comment by drewbr...@gmail.com on 19 May 2011 at 7:06

GoogleCodeExporter commented 9 years ago
Much worse for IE7.. no clicks work. Works fine in IE9.

Original comment by pett...@gmail.com on 23 Nov 2011 at 9:43

GoogleCodeExporter commented 9 years ago
It sounds like you're plotting a lot of data, and the chart is taking a while 
to redraw.  Since browsers are single-threaded, a redraw basically prevents any 
other actions from happening.  That's why this is worse under IE7; the slower 
the browser, the longer it takes to redraw.

So this isn't strictly a bug, and there isn't any way to solve the problem 
directly.  The only real solution is to modify Flot so it redraws 
incrementally, giving time back to the browser to process other events.

I'm accepting this as an enhancement for that functionality.

Original comment by dnsch...@gmail.com on 5 Jun 2012 at 4:32