Skip to content

destroy处理不够干净? #69

@qidizi

Description

@qidizi

destroy: function() {
if (this._shim) {
this._shim.destroy();
}
// clean event binding of autohide
$('body').off('mousedown.calendar');
BaseCalendar.superclass.destroy.call(this);
}

以下的这些事件好像没有看到有清理?

var event = this.get('triggerType') + '.calendar';
$trigger.on(event, function() {
self.show();
self._shim.sync();
});
$trigger.on('blur.calendar', function() {
self.hide();
self._shim.sync();
});
// enable auto hide feature
if ($trigger[0].tagName.toLowerCase() !== 'input') {
self.autohide();
}

导致hide、show动作在destroy后还生效

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions