View Full Version : Button Remove

30 Jan 2010, 1:37 AM

I am using Extjs 3.1

When i remove a button by using

but still the 'click' event remains as it is.
and then when i add a button on one click twos times that event is fired

Ext.get('edit_button').on('click', function(e) {
// some function


30 Jan 2010, 1:40 PM
If the button exists as part of a toolbar or other Container, you should remove it from its parent, which will flush the click handler registration.

Else, you can just *destroy* the button, and that will do the same.