angular / angular/angular

component events should mask event propagation.

Open
#4,059 13 comments 28 reactions 0 assignees View on GitHub
area: core core: event listeners core: inputs / outputs P3 state: confirmed type: bug/fix
Dominant language
TypeScript
Stars
101k
Forks
27.5k
Avg merge
1d 19h
Merged PRs (30d)
288

Description

```
@Component({
selector: 'my-component'
events: ['change']
})
@View({
template: ''
})
class MyComponent {
}
```

The above code creates an issue. It conflates the `change` event from the `MyComponent` with the bubbling `change` event from the ``.

The correct behavior is that the `change` event which is part of the components should filter out the DOM `change` events. Otherwise

```

```

will sometimes get the `$event` from the `MyComponent` and sometimes from the `input` event.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the component and input example from the issue, observing which change event reaches the my-component handler. Trace the component-event and DOM bubbling behavior involved; done means component change events no longer conflate with or receive bubbled input change events.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.