PDA

View Full Version : TabPanel add event changed from 2.x?



mschwartz
31 Jul 2009, 11:47 AM
In 2.x, I was using tabPanel.on('add', ...) to do some special case stuff when new tabs were added to the tab panel. Under 3.x, all of a sudden I'm seeing add fired for every component on the panel that's added to the tabPanel. This is a recursive effect, too. Like add a portal layout in a tab and add is fired for the tab panel for every portlet added to the portal.

Yikes.

So is there a good way to detect only tabs added?

I don't think this is the right behaviour, FWIW. The add event should only fire when something is directly added to the tab panel, like a toolbar (not to one of the tabs' panels) or a panel, etc. But it should not fire an add event for the tab panel when you add a button to that toolbar.

mjlecomte
31 Jul 2009, 5:58 PM
This might be something to do with the event bubbling. Check a similar open thread in bugs for tree panel.

mschwartz
3 Aug 2009, 4:49 AM
This is a very serious problem. I may end up downgrading to 2.3.0 because of this.