I have a panel with a tap listener (red square), and above it is a button (green). Something like that:

When the button is pressed, I want to avoid the red squares listener, but I cannot find a way to do this. could you help me?
This example is not really my code (im using a controller, dataitems, etc.), but the same problem: http://jsfiddle.net/6ah6U/
Ext.Viewport.add({ xtype: 'panel', height: 300, width: 300, style: 'background: #ff0000', items: [{ xtype: 'panel', height: 50, width: 50, style: 'background: #00ff00', listeners: { tap: function() { console.log('green tapped'); }, element: 'element' }, }], listeners: { tap: function() { console.log('red tapped'); }, element: 'element' }, });
Thanks!
source share