Skip to content

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

Open
dnschnur opened this Issue Sep 28, 2012 · 3 comments

1 participant

@dnschnur
Flot member

Original author: admin%ma...@gtempaccount.com (December 09, 2009 00:10:15)

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: http://code.google.com/p/flot/issues/detail?id=272

@dnschnur
Flot member

From drewbr...@gmail.com on May 19, 2011 19:06:55
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.

@dnschnur
Flot member

From pettetd@gmail.com on November 23, 2011 21:43:15
Much worse for IE7.. no clicks work. Works fine in IE9.

@dnschnur
Flot member

From dnsch...@gmail.com on June 05, 2012 16:32:58
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.