Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

destroy处理不够干净? #69

Open
qidizi opened this issue Dec 16, 2014 · 0 comments
Open

destroy处理不够干净? #69

qidizi opened this issue Dec 16, 2014 · 0 comments

Comments

@qidizi
Copy link

qidizi commented Dec 16, 2014

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后还生效

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant