Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    ValueClickHandler on FacetChart not working when ClickHandlers on chart's DrawItems

    SmartGWT-pro 6.0-p20170620.
    Google Chrome version 61.0.3163.100

    Hello,
    we are working with FacetChart and are experiencing some strange behaviour. We were using ValueClickHandler on our chart and it was working normally but when we added ClickHandlers on certain DrawItems of this chart then the ValueClickHandler suddenly stopped working (event was not triggered). The ClickHandler on DrawItems was working. When we removed the ClickHandler the problem with ValueClickHandler disappeared but for our use case we need both of the handlers. Could it be that the ValueClickHandler somehow uses ClickHandlers on DrawItems so ours ClickHandlers are interfering with it?

    #2
    Yes, most likely this is the problem. Make sure you are not cancel()ing the event as this will obviously interfere. If you are not doing so, and still having a problem, a workaround would be to call the code that is normally invoked via the ValueClickHandler from your ClickHandler instead.

    Finally, if you think this may be a framework issue, you can put together a minimal, ready-to-run test case demonstrating the problem, and we can take a look. However, be sure to first test against the latest patched version, and also report the rest of the missing information (browser(s) affected, GWT version, etc) - see FAQ.

    Comment


      #3
      No we are not calling cancel() on either of the events. We managed to get it running by replacing ClickHandler on the DrawItem with MouseDownHandler although ClickHandler would be more appropriate. I think we can't use your suggested workaround because we need to work with DrawnValue which we obtain from the ValueClickHandler and which as far as we known could not be obtained via DrawItem and vice versa.

      Comment

      Working...
      X