Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf(cdk/a11y): avoid triggering change detection if there are no sub…
…scribers to stream (angular#15077) Currently we have an `NgZone.run` call on each `focus` and `blur` event of a monitored event in order to bring its subscribers into the `NgZone`, however this means that we're also triggering change detection to any consumers that aren't subscribed to changes (e.g. `mat-button` only cares about the classes being applied). These changes move around some logic so that the `NgZone.run` is only hit if somebody has subscribed to the observable.
- Loading branch information