tags:

views:

25

answers:

0

Is there any way to find where an event is being swallowed? I'm developing a new Panel in an existing app. The main Panel is a VerticalPanel with an existing Panel/Widget on the bottom and my new Panel on top. I have a few 'normal' events in my new Panel, such as clicking on buttons, mouse wheel handling for scrolling, which work fine when that new Panel is the only Panel in the parent VerticalPanel. But when I add the existing Panel on the bottom, the events on the top panel stop working.

The outer container of our main app, in which this new VerticalPanel resides, implements NativePreviewHandler. This app is complex and I'm still learning it, but as I understand it, this previewer exists to handle particular more complicated events like default text selection when dragging or shift-click to highlight multiple selections on a list control. I've put breakpoints in this preview and the events I'm concerned with, such as a simple click on a button, flow through this previewer just fine.

The bottom panel is also a sophisticated Widget with a variety of event listeners. But I don't see how it could be intercepting click events outside of itself, which is what appears to be happening.

If I can grab the click events in the outer previewer, is there any way to attach something to them to identify where they're being swallowed? I've looked at the API for GwtEvent and DomEvent and there doesn't seem to be much there to work with. If I could track where stopPropagation() is being called that might help, but I don't see how to do that without extending the event, and I don't see how to do that on an Event that's already created and being handled. Unless I did something odd like catching the event, creating my sub-class with the original event, stopping the original event, and then throwing my new sub-classed event.