Approved
Last Updated: 08 Feb 2019 08:07 by ADMIN
Eduard Töws
Created on: 08 Feb 2019 07:48
Category: Kendo UI for jQuery
Type: Feature Request
0
Widgets in Dialog are not destroyed at Dialog.destroy()
Hello ladies and gentlemen.

At call of Dialog.destroy() will not destroy the widgets inited in Dialog.element

Window destroy:
...
_destroy: function () {
    if (this.resizing) {
            this.resizing.destroy();
    }
    if (this.dragging) {
            this.dragging.destroy();
    }
    this.wrapper.off(NS).children(KWINDOWCONTENT).off(NS).end().find('.k-resize-handle,.k-window-titlebar').off(NS);
    $(window).off('resize' + NS + this._marker);
    $(window).off(MODAL_NS);
    $(window).off(NS);
    clearTimeout(this._loadingIconTimeout);
    Widget.fn.destroy.call(this);
    this.unbind(undefined);
    kendo.destroy(this.wrapper);
    this._removeOverlay(true);
},
destroy: function () {
    this._destroy();
    this.wrapper.empty().remove();
    this.wrapper = this.appendTo = this.element = $();
},
...

Dialog destroy:
...
destroy: function () {
    var that = this;
    that._destroy();
    Widget.fn.destroy.call(that);
    that.wrapper.remove();
    that.wrapper = that.element = $();
},
_destroy: function () {
    var that = this;
    var ns = '.' + NS;
    that.wrapper.off(ns);
    that.element.off(ns);
    that.wrapper.find(KICONCLOSE + ',' + KBUTTONGROUP + ' > ' + KBUTTON).off(ns);
    that._stopCenterOnResize();
},
...

In Dialog.detroy() will kendo.destroy() not be called.

Best regards,
Eduard Töws

(Total attached files size should be smaller than 20mb. Allowed extensions: .zip, .rar, .jpg, .png, .gif)
0 comments