View Full Version : container panel cancles events?

7 Jun 2012, 6:10 AM
I have a panel that once I am adding a listener clause to it
(with listening to some child event)
cause the child to stop getting the resize event it listens to.

If I am commenting this listener calue the child gets the resize.

Weired but this is the case. anyone know how to fix this?

8 Jun 2012, 12:15 PM
You will need to post your code for us to help you with this.


9 Jun 2012, 9:29 PM
Ext.define('MyApp.view.panel1', { extend: 'Ext.panel.Panel', alias: 'widget.panel1', layout: 'fit', initComponent: function () { this.items = [ { .... listeners: { SA_TreemMapNodeMouseOver: { fn: function (node, data, domElement, context) { this.onTreemMapNodeMouseOver(node, data, domElement, context); }, scope: this } } } ];

And I have an inner panel:

Ext.define('MyApp.view.common.InnerPanel', { extend: 'Ext.container.Container',...
listeners: { resize: function () { alert(); var widgetsWidth = this.getWidth(true); var widgetsHeight = this.getHeight(true); this.onResize(widgetsWidth, widgetsHeight); } },

The inner panel doesnt alert on the resize once the liustener code was added to the outer panel. If I comment the listener part on the outer it does work.

11 Jun 2012, 5:52 AM
Dude, come on. You're being a jerk. Format your code, so it is easy to read.

I'm thinking there is a better way to say that :)

11 Jun 2012, 9:41 PM
Dont know who is the who wrote this so go *** yourself.
Anyone if anyone knows why when adding listener to a parent control the child stops listening on the events like resize.
I only solved it now with registring using "on" on the parent but it seems weired that this is the solution