call disable before destroy to clear emptytext, fixes

This commit is contained in:
vitalets
2013-04-23 10:35:35 +04:00
parent 25bf2a360f
commit e97783378a
2 changed files with 9 additions and 4 deletions
src/element
test/unit

@ -416,6 +416,8 @@ Makes editable any HTML element on the page. Applied as jQuery method.
@method destroy()
**/
destroy: function() {
this.disable();
if(this.container) {
this.container.destroy();
}
@ -427,8 +429,7 @@ Makes editable any HTML element on the page. Applied as jQuery method.
this.$element.off("save.internal");
this.$element.removeClass('editable');
this.$element.removeClass('editable-open');
this.$element.removeClass('editable editable-open editable-disabled');
this.$element.removeData('editable');
}
};