0

I have a Canvas element, and a FlowPanel on top of it (in z order). When I click on the FlowPanel, it seems to intercept the click and stops propagating it. I don't have any click listeners set on it though. I want the canvas below it to receive the click event.

Is there a way to get the FlowPanel to ignore the click and let it propagate to the canvas that sits below it?

Thanks

user291701
  • 38,411
  • 72
  • 187
  • 285

1 Answers1

0

In Chrome, Firefox and Safari 4+ you can use the pointer-events CSS property (it's also well-supported by mobile browsers), but for other browsers (IE, Opera and older Safaris) you'll have to listen to click events at the FlowPanel level and fire synthetic click events on the canvas.
Assuming the FlowPanel and the canvas are aligned, at the same position, you should be able to use DomEvent.fireNativeEvent coupled with Document.get().createClickEvent.

Thomas Broyer
  • 64,353
  • 7
  • 91
  • 164