You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: