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

Feature request: no output named after a standard DOM event #473

Closed
gbilodeau opened this issue Dec 17, 2017 · 0 comments
Closed

Feature request: no output named after a standard DOM event #473

gbilodeau opened this issue Dec 17, 2017 · 0 comments

Comments

@gbilodeau
Copy link
Contributor

Naming a custom directive output after a standard DOM event can cause unwanted behaviour because of event bubbling. As explained clearly here, declaring a listener for a custom directive output with a "submit" name will be invoked not only when this output emits a new value but also when a native "submit" event bubbles up from a possible descendant form.

This issue has also been discussed here, resulting in a statement that this behaviour is just "common sense". Since common sense isn't necessarily obvious to new users of the framework, it would be useful to create a rule that highlights such a naming practice error.

There are no guidelines with regards to this in the Angular style guide.

PR will follow.

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