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

mail_base breaks all other modules which use bus notification #371

Open
alex2grad opened this issue Dec 16, 2021 · 3 comments
Open

mail_base breaks all other modules which use bus notification #371

alex2grad opened this issue Dec 16, 2021 · 3 comments

Comments

@alex2grad
Copy link

Need to remove
bus.off('notification');
from mail_base/static/lib/base.js

Calling .off() with no arguments removes all handlers attached to the bus

@yelizariev
Copy link
Collaborator

yelizariev commented Dec 17, 2021

Just removing will break the mail_base module...

@alex2grad
Copy link
Author

alex2grad commented Dec 17, 2021

No, removing it breaks nothing. I checked.
Why do you think it breaks mail_base?

If you want to remove mail_base's event you should provide the selector and event arguments.

https://api.jquery.com/off/

@yelizariev
Copy link
Collaborator

I mean that is was added by a purpose. As I remember, it's needed because we copy-pasted code from original mail module and without .off() we'd have duplicates fo the handler.
We can take a look, if you make a PR

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

2 participants