DeadPassive
DeadPassive

Reputation: 887

Forwarding mouse events between GWT panels

I've got a few GWT panels layered on top of each other inside a LayoutPanel. My bottom panel requires mouse events, but these are being caught by the top panel. Is there any way of preventing a panel from sinking events, leaving those events to be caught by a panel lower in the stack?

Thanks,

Jon

Upvotes: 1

Views: 699

Answers (1)

Thomas Broyer
Thomas Broyer

Reputation: 64541

There's the CSS property pointer-events: none but that won't work in IE and Opera. For those (at least), I think you'll have to:

  1. temporarily hide the higher layers,
  2. find the element that would have been targeted in the lower layer (use $doc.elementFromPoint from JSNI),
  3. and then unhide the higher layers.
  4. fire a synthetic event on it

Don't worry, the hide/unhide will be imperceptible to the user (the browser won't even render it)

Upvotes: 1

Related Questions