MooDialog icon indicating copy to clipboard operation
MooDialog copied to clipboard

Overlay should be destroyed togeter with window

Open ghost opened this issue 14 years ago • 1 comments

Overlay should be destroyed together with window

Currently window is being destroyed in MooDialog.destroy, but overlay is left orphaned. To fix this I would suggest the following changes


// Modyfy MooDialog.destroy to fire "destroy" event
destroy: function(){
      this.fireEvent('destroy');
        this.wrapper.destroy();
    },

// handle this event in MooDialog.Fx
onDestroy : function() {
      this.overlay.destroy();
    }

// finally add "destroy" method to Overlay class
destroy : function() {
      this.overlay.destroy();
    }

ghost avatar Jan 23 '11 21:01 ghost

I probably should destroy the Overlay indeed, thanks for reporting.

arian avatar Jan 25 '11 19:01 arian